#include <WorkQueue.h>
Public Member Functions | |
| CWorkQueue (CSyncObject *pextEvent) | |
| bool | AddItem (CWorkQueueItem *pFileAttr, bool uniqueItem=true) |
| bool | DelItem (CWorkQueueItem *pFileAttr) |
| bool | CheckItem (CWorkQueueItem *pFileAttr, bool ProcessOnly=false) |
| CWorkQueueItem * | GetProcItem (void) |
| Returns the currently being processed object's pointer. | |
Private Member Functions | |
| bool | WorkerThread (void) |
Static Private Member Functions | |
| UINT | WorkerThreadStart (CWorkQueue *pQueue) |
| Bootstrapping function for AfxBeginThread. | |
Private Attributes | |
| CEvent | m_WorkEvent |
| Wakes up the worker thread when new objects need processing. | |
| CMutex | m_WorkQueueMutex |
| Keep pesky threads from trampling the queue. | |
| CSyncObject * | m_pThreadEvents [2] |
| Array for the worker thread's wake-up events. | |
| CWinThread * | m_pWorkerThread |
| Safe-keeping the worker thread's pointer, just in case. Also used by the destructor to detect thread exit. | |
| bool | m_PendDelete |
| Set by the destructor while waiting for the worker thread to exit. | |
| CWorkQueueItem * | m_WorkItem |
| Holds the pointer to the currently being processed object. | |
| CTypedPtrList< CPtrList, CWorkQueueItem * > | m_WorkQueue |
| Contains a list of items to process. | |
|
|
Initializes the queue and thread data then starts the Work Queue's thread.
|
|
||||||||||||
|
Adds an item to the processing list.
|
|
||||||||||||
|
Check if the item is in the processing list.
|
|
|
Removes an item from the processing list.
|
|
|
Processes queued tasks.
|
1.3.4