diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-05 15:58:33 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-05 15:58:33 +0000 |
commit | 558003a7250d878c8cc52bf2d8863394b9baf835 (patch) | |
tree | 6564e5791397e428bf168a9a27125c980080bbd6 /queue.h | |
parent | 62154cdde95ad579d4b2b98f59fac4817be8a0f4 (diff) | |
download | rsyslog-558003a7250d878c8cc52bf2d8863394b9baf835.tar.gz rsyslog-558003a7250d878c8cc52bf2d8863394b9baf835.tar.xz rsyslog-558003a7250d878c8cc52bf2d8863394b9baf835.zip |
- added multiple worker thread capability to queue class
- implemented $MainMsgQueueWorkerThreads config directive
Diffstat (limited to 'queue.h')
-rw-r--r-- | queue.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -45,7 +45,8 @@ typedef struct queue_s { queueType_t qType; int iQueueSize; /* Current number of elements in the queue */ int iMaxQueueSize; /* how large can the queue grow? */ - pthread_t thrdWorker; /* ID of the worker thread associated with this queue */ + int iNumWorkerThreads;/* number of worker threads to use */ + pthread_t *pWorkerThreads;/* array with ID of the worker thread(s) associated with this queue */ int bDoRun; /* 1 - run queue, 0 - shutdown of queue requested */ rsRetVal (*pConsumer)(void *); /* user-supplied consumer function for dequeued messages */ /* type-specific handlers (set during construction) */ @@ -84,7 +85,8 @@ typedef struct queue_s { /* prototypes */ rsRetVal queueDestruct(queue_t *pThis); rsRetVal queueEnqObj(queue_t *pThis, void *pUsr); -rsRetVal queueConstruct(queue_t **ppThis, queueType_t qType, int iMaxQueueSize, rsRetVal (*pConsumer)(void*)); rsRetVal queueStart(queue_t *pThis); +rsRetVal queueConstruct(queue_t **ppThis, queueType_t qType, int iWorkerThreads, + int iMaxQueueSize, rsRetVal (*pConsumer)(void*)); #endif /* #ifndef QUEUE_H_INCLUDED */ |