<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://valley.egloos.com/rss/style/style.xsl" type="text/xsl" media="screen"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>이글루스 'thread' 태그 최근글</title>
		<link>http://valley.egloos.com/tag/thread</link>
		<description>thread</description>
		<language>ko</language>
		<pubDate>Wed, 01 Oct 2008 21:30:32 +0900</pubDate>
		<generator>Egloos</generator>
		<item>
	<title><![CDATA[기본적인 Mutex 초기화 방법들]]></title>
	<link>http://hkpco.egloos.com/898623</link>
	<guid>http://hkpco.egloos.com/898623</guid>
	<description>
	<![CDATA[ 
요즘 나름의 반 안식년(?ㅎㅎ)으로 인해 글이 뜸해서 간단히 하나 남겨봅니다. 유닉스 시스템 계열에서 제공되는 pthread에서 동기화를 위하여 mutex라는 것이 자주 사용되는데,  mutex 변수 초기화 시에 사용되는 방법이 대표적으로 두 가지 정도가 있습니다. (원래는 더 많지만 &quot;가장&quot; 기본적인 초기화를 기준으로)  그 중 하나가 바로 PTHREAD_MUTEX_INITIALIZER 이며, 해당 mutex를 default 속성으로 초기화 시켜줍니다. pthread.h 헤더에 다음과 같이 정의되어 있습니다. ============================================================== #define PTHREAD_MUTEX_INITIALIZER \   {0, 0, 0, 	]]>
	</description>
	<pubDate>Wed, 01 Oct 2008 21:30:32 +0900</pubDate>
	<dc:creator><![CDATA[hkpco.kr]]></dc:creator>
</item>
<item>
	<title><![CDATA[Thanks my mate!]]></title>
	<link>http://lbeibil.egloos.com/891859</link>
	<guid>http://lbeibil.egloos.com/891859</guid>
	<description>
	<![CDATA[ 
Facebook to me  show details 10:00 PM (12 hours ago) Reply Craig sent a message in reply to a thread.-------------------- Re: VIVA MEXICO!!My dear lovelies!!It's been too long so i thought i would say hi!As for mexico...it still has potential but i'm having some trouble getting subjects approved so that i can finish my degree. But as soon as that is organise i'll be soooooooooooooo happy and ready	]]>
	</description>
	<pubDate>Tue, 30 Sep 2008 10:36:44 +0900</pubDate>
	<dc:creator><![CDATA[beibi]]></dc:creator>
</item>
<item>
	<title><![CDATA[Working Thread에서 메세지 전송 방법]]></title>
	<link>http://jhakan.egloos.com/858491</link>
	<guid>http://jhakan.egloos.com/858491</guid>
	<description>
	<![CDATA[ 
Multi-Thread 프로그래밍을 하다 보면 가끔 Working-Thread에서 User-Interface-Thread로 뭔가를 알려주거나 넘겨줘야 할 때가 있다.  가령..  '요청했던 일 다 했으니 완료했다고 글이라도 뿌려줘~''I/O를 Monitoring하고 있었는데.. 뭔가 왔네. Queue에 넣어뒀으니 알아서 처리해~''그냥~ 심심해서~'등등..    Working-Thread는 Message Queue가 존재하지 않기 때문에 자체적으로 SendMessage/PostMessage를 해봐야 별 소용이 없다.  그래서 User-Interface-Thread로 메세지를 보내줘야 하는데...  CUIWndow* pWnd = [User-Interface-Thread의 Pointer];    pWnd-&amp;gt	]]>
	</description>
	<pubDate>Mon, 22 Sep 2008 14:14:34 +0900</pubDate>
	<dc:creator><![CDATA[Jaehak's Small Den]]></dc:creator>
</item>
<item>
	<title><![CDATA[Threading in C# part1]]></title>
	<link>http://joose2.egloos.com/857974</link>
	<guid>http://joose2.egloos.com/857974</guid>
	<description>
	<![CDATA[ 
Threading in C#Joseph Albahari    Overview and ConceptsC# supports parallel execution of code through multithreading. A thread is an independent execution path, able to run simultaneously with other threads. A C# program starts in a single thread created automatically by the CLR and operating system (the &quot;main&quot; thread), and is made multi-threaded by creating additional threads. Here's a simple exa	]]>
	</description>
	<pubDate>Mon, 22 Sep 2008 11:15:42 +0900</pubDate>
	<dc:creator><![CDATA[서정민님의 이글루]]></dc:creator>
</item>
<item>
	<title><![CDATA[wpf에서 thread를 사용하려고 할때]]></title>
	<link>http://glintist.egloos.com/2038603</link>
	<guid>http://glintist.egloos.com/2038603</guid>
	<description>
	<![CDATA[ 
UI작업시 시간이 걸리는 작업은 쓰레드가 필수이다. 그래서 작업은 쓰레드로 돌리고 자료는 UI를 통해 보여주는데 (물론 .net에서는 기본적으로 UI도 쓰레이다.)  사용자 쓰레드에서 UI를 직접 호출하여 자료를 화면에 보여주고 싶을 때가 있다. 하지만 쓰레드간 컨트롤 접근(Cross Thread던가.. Control이던가..) 은 허용하지 않는다.  .net 초기 버전은 이러한 사항이 없는걸로 알고 있고(이젠 상관 없는 이야기) .net 2.0버전은 &quot;System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls&quot; 를 false로 설정함으로써 cross thread 검사를 피해 갈수 있었다. (이때까지 참 편했지.... ㅠ____ㅠ )  하지만 3.0에 와서는	]]>
	</description>
	<pubDate>Sun, 21 Sep 2008 05:12:56 +0900</pubDate>
	<dc:creator><![CDATA[###잡식성 셔터빡스~☆ 누르벩###]]></dc:creator>
</item>
<item>
	<title><![CDATA[CWinThread로부터 CWnd를 얻는 방법]]></title>
	<link>http://miryu17.egloos.com/2004554</link>
	<guid>http://miryu17.egloos.com/2004554</guid>
	<description>
	<![CDATA[ 
  CWinThread로부터 CWnd를 얻어오려면,1. CWnd* pWnd = CWinThread-&amp;gt;m_pActiveWnd;  2. CWnd* pWnd = CWinThread-&amp;gt;m_pMainWnd;  3. CWnd* pWnd = CWinThread-&amp;gt;GetMainWnd();  그 다음 HWND가 필요할때 CWnd로 이렇게 하면 된다,  HWND hWnd = pWnd-&amp;gt;m_hWnd;   HWND hWnd = pWnd-&amp;gt;GetSafeHwnd();  그 반대로 만약에 HWND에서 CWnd를 구하려면  CWND* pWnd = CWnd::FromHandle(hWnd);   AfxBeginThread를 할 경우 리턴값이 새로 생성되는 쓰레드의 CWinThread* 이다.   그래서 위의 방법	]]>
	</description>
	<pubDate>Sat, 06 Sep 2008 10:21:15 +0900</pubDate>
	<dc:creator><![CDATA[미류의 어쩌구 저쩌구]]></dc:creator>
</item>
<item>
	<title><![CDATA[쓰레드 패키지 모델(Thread Package Implementation)]]></title>
	<link>http://WildGoose.egloos.com/475245</link>
	<guid>http://WildGoose.egloos.com/475245</guid>
	<description>
	<![CDATA[ 
User-Level Thread프로세스 내에서 쓰레드를 가상적으로 구현하는 것프로세스 내에서 각각의 상태 저정 및 그것을 전환시키는 것 모두를 구현운영체제로 인한 제약 없이 빠르고 효율적일 수 있으나 쓰레드 내에서 시스템 차원의 블로킹 함수를 호출하게 되면 전체 프로세스가 블록되버르는 점과 멀티 프로세서를 사용 할 수 없다는 문제점을 가지고 있음Kernel-Level Thread운영체제가 직접적으로 쓰레드를 관리하게 되며 CPU에서 컨텍스트 스위칭이 일어나게 되는 구조이다.현재 Windows, Mach, Solaris에서 사용운영체제 내부에서 지원하고 작동하므로 시스템 차원의 블로킹 함수를 호출하더라도 나머지 쓰레드들은 정상적으로 작동Multiplexed Thread위의 두가지의 장점을 조합한 방식으로 Su	]]>
	</description>
	<pubDate>Mon, 16 Jun 2008 14:33:57 +0900</pubDate>
	<dc:creator><![CDATA[이글루, 이걸루?]]></dc:creator>
</item>
<item>
	<title><![CDATA[[MSDN - VC6.0] IMPLEMENT_DYNCREATE]]></title>
	<link>http://lipprince.egloos.com/267069</link>
	<guid>http://lipprince.egloos.com/267069</guid>
	<description>
	<![CDATA[ 
 IMPLEMENT_DYNCREATEIMPLEMENT_DYNCREATE( class_name, base_class_name )Parametersclass_nameThe actual name of the class (not enclosed in quotation marks).base_class_nameThe actual name of the base class (not enclosed in quotation marks).RemarksUse the IMPLEMENT_DYNCREATE macro with the DECLARE_DYNCREATE macro to enable objects of CObject-derived classes to be created dynamically at run time. The fr	]]>
	</description>
	<pubDate>Tue, 22 Apr 2008 17:48:27 +0900</pubDate>
	<dc:creator><![CDATA[밥옹]]></dc:creator>
</item>
<item>
	<title><![CDATA[[MSDN - VC6.0] DECLARE_DYNCREATE]]></title>
	<link>http://lipprince.egloos.com/267064</link>
	<guid>http://lipprince.egloos.com/267064</guid>
	<description>
	<![CDATA[ 
 DECLARE_DYNCREATE DECLARE_DYNCREATE( class_name )Parametersclass_nameThe actual name of the class (not enclosed in quotation marks).RemarksUse the DECLARE_DYNCREATE macro to enable objects of CObject-derived classes to be created dynamically at run time. The framework uses this ability to create new objects dynamically, for example, when it reads an object from disk during serialization. Document	]]>
	</description>
	<pubDate>Tue, 22 Apr 2008 17:45:19 +0900</pubDate>
	<dc:creator><![CDATA[밥옹]]></dc:creator>
</item>
<item>
	<title><![CDATA[[MSDN - VC6.0] AfxBeginThread]]></title>
	<link>http://lipprince.egloos.com/266981</link>
	<guid>http://lipprince.egloos.com/266981</guid>
	<description>
	<![CDATA[ 
 AfxBeginThread CWinThread* AfxBeginThread( AFX_THREADPROC pfnThreadProc, LPVOID pParam, int nPriority = THREAD_PRIORITY_NORMAL, UINT nStackSize = 0, DWORD dwCreateFlags = 0, LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL );CWinThread* AfxBeginThread( CRuntimeClass* pThreadClass, int nPriority = THREAD_PRIORITY_NORMAL, UINT nStackSize = 0, DWORD dwCreateFlags = 0, LPSECURITY_ATTRIBUTES lpSecurityAtt	]]>
	</description>
	<pubDate>Tue, 22 Apr 2008 17:13:40 +0900</pubDate>
	<dc:creator><![CDATA[밥옹]]></dc:creator>
</item>
<item>
	<title><![CDATA[Boost Thread 문서 번역]]></title>
	<link>http://javawork.egloos.com/1848482</link>
	<guid>http://javawork.egloos.com/1848482</guid>
	<description>
	<![CDATA[ 
Boost 1.34 버젼의 Thread 라이브러리 문서를 번역중에 새버젼(1.35)이 나와버렸습니다. (-ㅅ-;)  구버젼 문서 번역해봐야 의미 없으니 번역한 부분까지만 공개하고 새로운 버젼의 문서를 번역할 예정.    구버젼의 문서이기는 하지만 라이브러리를 설계한 의도, 어느 부분(안정성 혹은 성능)에 무게를 두고 개발했는지, 멀티스레드 프로그램을 개발할때 주의할 점 등의 내용이 있어서 한번 읽어볼만은 합니다.   	]]>
	</description>
	<pubDate>Thu, 17 Apr 2008 19:41:48 +0900</pubDate>
	<dc:creator><![CDATA[flexible gameserver]]></dc:creator>
</item>
<item>
	<title><![CDATA[Boost 사용기(삽질기) - 2]]></title>
	<link>http://fantail25.egloos.com/3684691</link>
	<guid>http://fantail25.egloos.com/3684691</guid>
	<description>
	<![CDATA[ 
 어제 봤었던 GIL에서의 png 파일 로딩의 문제의 경우 팔레트를 가진 이미지와 Gray Alpha 채널을 가진 이미지에 대한 처리가 없었던 것이 문제였다. 아마도 일반적으로 사용하지 않는 타입이라 판단한것인지 이유는 정확히는 알 수 없지만, 이를 구현 되게 하려면 적절한 수정이 필요할듯 하다.     Boost의 thread를 사용하다 발견한 어떻게 보면 별것 아닐 문제 중 하나로는 boost::thread를 사용하게 되면 라이브러리가 링킹 된 이후에 TLS callback을 사용할 수 없다면서 upx로 압축이 되지 않는다. 아마 DLL로 shared linking을 한다면 제대로 돌아갈 듯도 하지만 DLL이 마구 늘어나는 것은 좋아 하지 않기 때문에 이 부분을 보아 boost::thread를 사용하는 	]]>
	</description>
	<pubDate>Tue, 01 Apr 2008 13:51:33 +0900</pubDate>
	<dc:creator><![CDATA[게으른 늘보의 쉼터]]></dc:creator>
</item>
<item>
	<title><![CDATA[DB 처리 스레드 개수에 따른 성능 비교]]></title>
	<link>http://javawork.egloos.com/1812310</link>
	<guid>http://javawork.egloos.com/1812310</guid>
	<description>
	<![CDATA[ 
<img 
				src="http://pds9.egloos.com/pds/200803/25/14/d0043314_47e814aeac54e_t.jpg"  
				alt="DB 처리 스레드 개수에 따른 성능 비교" 
				width="100px"  
				height="76pxpx"
				align="left"
				style="border:1px solid #DDDDDD;margin:0 10px 10px 0px;"
				/> 		DB처리 스레드를 많이 만들면 작업을 더 빨리 처리할 수 있을 까 하는 의문에서 테스트를 해보게 되었습니다.    DBQueue를 만들고 그안에 3만개의 작업을 넣었습니다. Insert/Update/Select 각 1만개씩 입니다. 처리 스레드에서는Queue에서 작업을 하나씩 꺼내어 처리합니다. DB 처리 스레드를 1/2/4/8/16 개 생성하여 처리 시간을 비교하였습니다.PC스펙은 AMD Athlon 64 X2 Dual 3800+ 2GHz  1 GB RAM 입니다.          4thread일때 최적의 성능을 보여줍니다. 1 thread 일때보다 1.36배 정도 빠른 성능을 보여줍니다. DB 처리모듈은ODBC를 사용하였고 DB는 MSSQL Server 2005 Express Edition입니다. 스	]]>
	</description>
	<pubDate>Tue, 25 Mar 2008 05:53:17 +0900</pubDate>
	<dc:creator><![CDATA[flexible gameserver]]></dc:creator>
</item>
<item>
	<title><![CDATA[OpenMP]]></title>
	<link>http://purewell.egloos.com/3498737</link>
	<guid>http://purewell.egloos.com/3498737</guid>
	<description>
	<![CDATA[ 
OpenMP는 다양한 플랫폼에서 C/C++/Fortran에서 병렬처리를 손쉽게 해주는 API일종이다. 공식 홈페이지는이다. 뭔말인고 하니, 병렬처리 프로그래밍하려면 UNIX에서 fork/ipc나 pthread 등등 다양한 API에 대해 공부해야하고, 이것을 Windows로 옮길 경우, Win32API로 소스를 뜯어 고쳐야하는 불상사가 있었다. 이걸 해결하고자 OpenMP 표준을 지키는 컴파일러에서 간단하게 thread를 생성, 운용할 수 있도록 통합한 API이다. 게다가 잘만 운용하면 기존 소스를 거의 고칠 필요가 없다는 것! OpenMP는 현재 2.5(Draft는 3.0)까지 나왔으며, GCC에서 지원하는 것도 2.5까지다. 컴파일할 때 -fopenmp를 해주면 &quot;#pragma omp&quot; 구문을 알아서 &quot;o	]]>
	</description>
	<pubDate>Fri, 23 Nov 2007 15:25:16 +0900</pubDate>
	<dc:creator><![CDATA[Purewell.BIZ]]></dc:creator>
</item>
<item>
	<title><![CDATA[Thread Local storage]]></title>
	<link>http://sian999.egloos.com/3945779</link>
	<guid>http://sian999.egloos.com/3945779</guid>
	<description>
	<![CDATA[ 
Thread Local storage 동적 스레드 로컬 저장소 스레드마다 할당하는 방식으로 데이터를 저장할 필요가 있거나  이렇게 하는 방법이 더 편할때가 있다. TlsAllock함수를 사용해서 Index를 할당한다TlsAllock은 비트 플래그의 배열에서 사용되지 않은 항목을 찾아서 사용하는것으로 표시하고 함수를 호출한 스레드에게 인덱스를 리턴한다.DWORD TlsAllock(void) 리턴된 Index값을 이용해서 TlsSetValue 함수를 호출하면 인덱스의 위치에 있는  스레드 저장소에 32비트 값을 저장할 수 있다.BOOL TlsSetValue( DWORD dwTlsIndex, LPVOID lpvTlsValue ) Tls 배열에 저장된 값은 TlsGetValue 함수를 통해서 접근할 수 있다.LPV	]]>
	</description>
	<pubDate>Mon, 19 Nov 2007 18:30:58 +0900</pubDate>
	<dc:creator><![CDATA[꽃파는거북이]]></dc:creator>
</item>
	</channel>
</rss>