文件名称:FProducerResumerQueue
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
1.可以设置队列中的最大长度;
2.线程安全;
3.多线程想向队列中放入数据时,可设置等待队列有空位的超时时间,当有空位时,等待线程会被唤醒并将数据加入队列。函数原型为:FTLThreadWaitType Append(const ELEMENT& element, DWORD dwTimeOut).
4.多线程从队列中取出数据时,可设置等待队列有数据的超时时间, 当有数据时等待线程会被唤醒。函数原型为:FTLThreadWaitType Remove(ELEMENT& element, DWORD dwTimeOut),
5.支持安全的退出,即如果在等待加入数据或取出数据时,能直接通过Stop唤醒。
6.支持动态改变队列大小 -- 但这个功能我测试的不是很多,可能有Bug,如发现有Bug请告诉我。
7.和我其他FTL中的类一样,支持模版。-Can set the maximum length of the queue 2. Thread-safe multi-threaded into the data to the queue, you can set the timeout waiting queue space, the waiting thread will be awakened and when vacancies data queued. The function prototype: FTLThreadWaitType append (const ELEMENT & element, DWORD dwTimeout) of multi-threaded data is removed from the queue, set time-out waiting queue data, when the data waiting thread will be awakened. The function prototype: FTLThreadWaitType Remove (ELEMENT & element, DWORD dwTimeout) support safe exit, waiting to join the data or remove data directly through the Stop wake. Support dynamic change the size of the queue- but this test is not a lot, may have bugs, such as Bug please tell me. And my other FTL class support template.
2.线程安全;
3.多线程想向队列中放入数据时,可设置等待队列有空位的超时时间,当有空位时,等待线程会被唤醒并将数据加入队列。函数原型为:FTLThreadWaitType Append(const ELEMENT& element, DWORD dwTimeOut).
4.多线程从队列中取出数据时,可设置等待队列有数据的超时时间, 当有数据时等待线程会被唤醒。函数原型为:FTLThreadWaitType Remove(ELEMENT& element, DWORD dwTimeOut),
5.支持安全的退出,即如果在等待加入数据或取出数据时,能直接通过Stop唤醒。
6.支持动态改变队列大小 -- 但这个功能我测试的不是很多,可能有Bug,如发现有Bug请告诉我。
7.和我其他FTL中的类一样,支持模版。-Can set the maximum length of the queue 2. Thread-safe multi-threaded into the data to the queue, you can set the timeout waiting queue space, the waiting thread will be awakened and when vacancies data queued. The function prototype: FTLThreadWaitType append (const ELEMENT & element, DWORD dwTimeout) of multi-threaded data is removed from the queue, set time-out waiting queue data, when the data waiting thread will be awakened. The function prototype: FTLThreadWaitType Remove (ELEMENT & element, DWORD dwTimeout) support safe exit, waiting to join the data or remove data directly through the Stop wake. Support dynamic change the size of the queue- but this test is not a lot, may have bugs, such as Bug please tell me. And my other FTL class support template.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
PRTest.cpp
FProducerResumerQueue.h
FProducerResumerQueue.hpp