QueuesDemo

所属分类:单片机开发
开发工具:Visual C++
文件大小:244KB
下载次数:3
上传日期:2014-01-06 09:06:47
上 传 者wuhuawen1989
说明:  readandwriteque 读写缓冲区的实现
(readandwriteque write buffer to achieve)

文件列表:
GridCtrl (0, 2010-10-29)
GridCtrl\CellRange.h (4755, 2010-06-28)
GridCtrl\Debug (0, 2010-10-29)
GridCtrl\Debug\BuildLog.htm (6920, 2010-10-21)
GridCtrl\GridCell.cpp (7078, 2004-03-13)
GridCtrl\GridCell.h (6278, 2010-06-28)
GridCtrl\GridCellBase.cpp (26728, 2004-03-13)
GridCtrl\GridCellBase.h (7800, 2010-06-28)
GridCtrl\GridCtrl.aps (58816, 2009-05-23)
GridCtrl\GridCtrl.cpp (225181, 2009-05-23)
GridCtrl\GridCtrl.h (39898, 2010-06-28)
GridCtrl\GridCtrl.rc (5212, 2009-05-23)
GridCtrl\GridCtrl.sln (1061, 2010-06-03)
GridCtrl\GridCtrl.vcproj (5737, 2010-10-19)
GridCtrl\GridCtrl.vcproj.EMEAAD.fstrati.user (1397, 2010-10-29)
GridCtrl\GridCtrl.vcproj.FEDERICO-1C2246.Administrator.user (1407, 2010-06-08)
GridCtrl\GridCtrl.vcproj.vspscc (257, 2010-06-03)
GridCtrl\GridCtrl.vssscc (256, 2010-06-03)
GridCtrl\GridDropTarget.cpp (4598, 2002-07-14)
GridCtrl\GridDropTarget.h (2703, 2010-06-28)
GridCtrl\InPlaceEdit.cpp (8509, 2002-07-14)
GridCtrl\InPlaceEdit.h (2585, 2010-06-28)
GridCtrl\MemDC.h (3544, 2010-06-28)
GridCtrl\mssccprj.scc (271, 2010-10-19)
GridCtrl\Release (0, 2010-10-29)
GridCtrl\Release\BuildLog.htm (6964, 2010-10-21)
GridCtrl\res (0, 2010-07-21)
GridCtrl\Resource.h (577, 2009-05-23)
GridCtrl\res\GridCtrl.ico (21630, 2005-08-12)
GridCtrl\res\GridCtrl.rc2 (399, 2009-05-23)
GridCtrl\res\vssver2.scc (119, 2010-06-03)
GridCtrl\stdafx.cpp (208, 2009-05-23)
GridCtrl\stdafx.h (2912, 2009-05-23)
GridCtrl\TitleTip.cpp (9722, 2002-07-14)
GridCtrl\TitleTip.h (2812, 2010-06-28)
GridCtrl\vssver2.scc (737, 2010-10-19)
StandardQueues (0, 2010-10-29)
StandardQueues\BaseSingleton.h (1191, 2010-06-24)
... ...

================================================================================ StandardQueues Project Overview =============================================================================== This application demonstrates the use of some Standard "Queues" used in real time programming techniques for inter-thread communication. Note: the queues shown are used only in inter-thread communications, between producers and consumers threads, but in the case of the circular buffer and flip flop double buffer ONLY you may use the structures embedded in a shared memory segment as to implement inter-process communication. This is not, alas, possible with the Multi Thread Single queue as this queue is unbounded in nature and hence not amenable to embedding in a fixed size memory segment. The sample offers example of use of 1. class CMultiThreadSingleQueue: concurrent unbounded queue with First In First Out (FIFO) semantics. This queue intended use is as a buffer in between multiple producers and multiple consumers. The sample shows the use by 3 producers and 2 consumers. 2. class CCircBuffer: concurrent bounded queue with First In First Out (FIFO) semantics. This queue intended use is as a buffer in between a single producer and a single consumer. Multiple consumers and producers are NOT allowed. Messages are passed in between the two threads in FIFO order and may be also stored in a shared segment memory for inter-process communication. 3. class CDoubleBuffer: flip flop double buffer as it may be used in between two threads ONLY: one producer and one consumer. The double buffer is a structure with two identical buffers that are used in a concurrent way by the two threads: when one thread writes to a buffer the other thread may read from the second buffer, after these operations end the buffers are swapped and the process continues. Messages are passed in between the two threads in FIFO order and may be also stored in a shared segment memory for inter-process communication. ///////////////////////////////////////////////////////////////////////////// The sample application also demonstrates the techniques used in managing threads for producers and consumers (worker threads) and for writing a simple multi tabbed dialog application (class CTabCtrlEx). The GridCtrl Library must be compiled before the demo app. These working solutions are for Visual Studio 2008 Service Pack 1. /////////////////////////////////////////////////////////////////////////////

近期下载者

相关文件


收藏者