文件名称:ThreadExamplePixelColor
- 所属分类:
- 进程与线程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 9kb
- 下载次数:
- 0次
- 提 供 者:
- a**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
多线程块模型(MTA)在每个进程里只有一个块而不是多个块。这单个块控制着多个线程而不是单个线程。这里不需要消息队列,因为所有的线程都是相同的块的一个部分,并且可以共享。这样的程序比单线程模型和STA的执行速度都要快,因为降低了系统的负载,因而可以优化来减少系统idle的时间。这些应用程序一般比较复杂,因为程序员必须提供线程同步以保证线程不会并发的请求相同的资源,因而导致竞争情况的发生。这里有必要提供一个锁机制。但是这样也许会导致系统死锁的发生。-Multi-threaded block model (MTA) in each process is only one block rather than multiple blocks. This single block controls multiple threads instead of a single thread. The message queue is not required here, because all of the threads are the same block of a part, and may be shared. Such a procedure should be faster than the speed of execution of the single-threaded model and STA, because the lower the load of the system, which can be optimized to reduce the idle time of the system. These applications tend to be more complicated, because the programmer must provide thread synchronization in order to ensure concurrent threads do not request the same resources, and thus lead to the occurrence of competition. Here it is necessary to provide a lock mechanism. But this may lead to the occurrence of system deadlock.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
GetPixelColor\res\GetPixelColor.rc2
.............\...\GetPixelColor.ico
.............\GetPixelColor.cpp
.............\GetPixelColor.dsp
.............\GetPixelColor.h
.............\GetPixelColorDlg.cpp
.............\GetPixelColorDlg.h
.............\StdAfx.cpp
.............\StdAfx.h
.............\GetPixelColor.rc
.............\GetPixelColor.dsw
.............\Resource.h
.............\res
GetPixelColor