diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-14 08:37:42 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-14 08:37:42 +0000 |
commit | dd36718bd11c85af49546ab589fa42bf512075ce (patch) | |
tree | 64e028d492472f0a3fc7aace150bf36db2ea6da4 /queue.h | |
parent | 16f39256b6bdc3ce5dafc17a14b553841eef2120 (diff) | |
download | rsyslog-dd36718bd11c85af49546ab589fa42bf512075ce.tar.gz rsyslog-dd36718bd11c85af49546ab589fa42bf512075ce.tar.xz rsyslog-dd36718bd11c85af49546ab589fa42bf512075ce.zip |
worker shutdown sequence enhanced to try different ways to shut down and
terminate workers if none helps (this protects against badly written
output plugins which hold the queue for too long)
Diffstat (limited to 'queue.h')
-rw-r--r-- | queue.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -79,6 +79,7 @@ typedef struct queue_s { int iQueueSize; /* Current number of elements in the queue */ int iMaxQueueSize; /* how large can the queue grow? */ int iNumWorkerThreads;/* number of worker threads to use */ + int iCurNumWrkThrd;/* current number of active worker threads */ qWrkThrd_t *pWrkThrds;/* array with control structure for the worker thread(s) associated with this queue */ int bImmediateShutdown;/* on shutdown, drain the queue --> 0 / do NOT drain the queue --> 1 */ int iUpdsSincePersist;/* nbr of queue updates since the last persist call */ @@ -94,6 +95,7 @@ typedef struct queue_s { /* synchronization variables */ pthread_mutex_t *mut; pthread_cond_t *notFull, *notEmpty; + pthread_cond_t condThrdTrm;/* signalled when threads terminate */ /* end sync variables */ /* the following variables are always present, because they * are not only used for the "disk" queueing mode but also for |