随笔分类 -  win32 多线程

学习
摘要:ReadWrit.hCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/**ReadWrit.h**SamplecodeforMultithreadingApplicationsinWin32*ThisisfromChapter7,Listing7-1*... 阅读全文
posted @ 2010-07-12 14:56 南守拥 阅读(649) 评论(0) 推荐(0)
摘要:/** IoByAPC.c** Sample code for Multithreading Applications in Win32* This is from Chapter 6, Listing 6-3** Demonstrates how to use APC's (asynchronous* procedure calls) instead of signaled objects* t... 阅读全文
posted @ 2010-07-09 15:03 南守拥 阅读(384) 评论(0) 推荐(0)
摘要:/** IoByEvnt.c** Sample code for Multithreading Applications in Win32* This is from Chapter 6, Listing 6-2** Demonstrates how to use event objects instead of* file handles to signal multiple outstandi... 阅读全文
posted @ 2010-07-08 16:26 南守拥 阅读(224) 评论(0) 推荐(0)
摘要:/** IoByFile.c** Sample code for Multithreading Applications in Win32* This is from Chapter 6, Listing 6-1** Demonstrates how a file handle becomes signaled* when an overlapped operation on the handle... 阅读全文
posted @ 2010-07-08 16:11 南守拥 阅读(371) 评论(0) 推荐(0)
摘要:Critical Section临界区用来实现 排他性占有 ,适用范围是单一进程的各线程之间,这旨:一个局部性对象,不是一个核心对象快速而有效不能够同时有一个以上的Critical Section 被等无法侦测是否已经某个线程放弃Mutex是一个核心对象,可以在不同的线程之间实现 排他性占有 ,甚至那些线程分属于不同进程,它是:一个核心对象如果拥有Mutex的那个线程结束,刚会产生一个 Aband... 阅读全文
posted @ 2010-07-08 15:19 南守拥 阅读(223) 评论(0) 推荐(0)
摘要:/** TaskQueM.c** Sample code for "Multithreading Applications in Win32"* This is from Chapter 3, Listing 3-3** Call ThreadFunc NUM_TASKS times, using* no more than THREAD_POOL_SIZE threads.* This vers... 阅读全文
posted @ 2010-07-08 14:23 南守拥 阅读(359) 评论(0) 推荐(0)
摘要:/** TaskQueS.c** Sample code for "Multithreading Applications in Win32"* This is from Chapter 3, Listing 3-2** Call ThreadFunc NUM_TASKS times, using* no more than THREAD_POOL_SIZE threads.* This vers... 阅读全文
posted @ 2010-07-08 13:47 南守拥 阅读(194) 评论(0) 推荐(0)
摘要:/** Busy2.c** Sample code for Multithreading Applications in Win32* This sample is mentioned in the text but there is* no associated listing in the book.** Run a busy loop and a worker thread at* the ... 阅读全文
posted @ 2010-07-08 11:48 南守拥 阅读(208) 评论(0) 推荐(0)
摘要:backprnt.cCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/**BackPrnt.c**Samplecodefor"MultithreadingApplicationsinWin32"*ThisisfromChapter2,Listing2-... 阅读全文
posted @ 2010-07-08 11:27 南守拥 阅读(278) 评论(0) 推荐(0)
摘要:/** Error.c** Sample code for "Multithreading Applications in Win32"* This is from Chapter 2, Listing 2-4** Demonstrate ExitThread*/#define WIN32_LEAN_AND_MEAN#include <stdio.h>#include <stdl... 阅读全文
posted @ 2010-07-07 11:12 南守拥 阅读(306) 评论(0) 推荐(0)
摘要:/** ExitThrd.c** Sample code for "Multithreading Applications in Win32"* This is from Chapter 2, Listing 2-3** Demonstrate ExitThread*/#define WIN32_LEAN_AND_MEAN#include <stdio.h>#include <s... 阅读全文
posted @ 2010-07-07 10:54 南守拥 阅读(335) 评论(0) 推荐(0)
摘要:/** ExitCode.c** Sample code for "Multithreading Applications in Win32"* This is from Chapter 2, Listing 2-2** Start two threads and try to exit* when the user presses a key.*/#define WIN32_LEAN_AND_M... 阅读全文
posted @ 2010-07-07 10:36 南守拥 阅读(239) 评论(0) 推荐(0)
摘要:/** Numbers2.cpp** Sample code for "Multithreading Applications in Win32"* This is from Chapter 10, Listing 10-2** Demonstrate thread startup in MFC* using AfxBeginThread, but prevent* CWinThread from... 阅读全文
posted @ 2010-07-07 10:03 南守拥 阅读(267) 评论(0) 推荐(0)
摘要:/** Numbers.c** Sample code for "Multithreading Applications in Win32"* This is from Chapter 2, Listing 2-1** Starts five threads and gives visible feedback* of these threads running by printing a num... 阅读全文
posted @ 2010-07-07 09:24 南守拥 阅读(324) 评论(0) 推荐(0)