diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-17 18:40:28 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-17 18:40:28 +0200 |
commit | 4c9eded44dbae1701bb3b8f255865892b19e7f72 (patch) | |
tree | 0610fa71ff86cba87cce2e1c6c36df26c854ae0b /runtime/queue.c | |
parent | 183b49015561890e148a50128c051a1cdd4491b9 (diff) | |
download | rsyslog-4c9eded44dbae1701bb3b8f255865892b19e7f72.tar.gz rsyslog-4c9eded44dbae1701bb3b8f255865892b19e7f72.tar.xz rsyslog-4c9eded44dbae1701bb3b8f255865892b19e7f72.zip |
further code simplification
... could even remove one mutex by using a better algorithm. I think I also
spotted some situation in which a hang could have happened. As I can't fix it
in v4 and less without moving to the new engine, I make no effort in testing
this out. Hangs occur during shutdown, only (if at all). The code changes
should also result in some mild performance improvement. Some bug potential,
but overall the bug potential should have been greatly reduced.
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 37ec3663..a2bb4c1d 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -312,7 +312,6 @@ TurnOffDAMode(qqueue_t *pThis) * during the lifetime of DA-mode, depending on how often the DA worker receives an * inactivity timeout. -- rgerhards, 2008-01-25 */ -dbgprintf("XXX: getLogicalQueueSize(pThis->pqDA): %d\n", getLogicalQueueSize(pThis->pqDA)); if(getLogicalQueueSize(pThis->pqDA) == 0) { pThis->bRunsDA = 0; /* tell the world we are back in non-DA mode */ /* we destruct the queue object, which will also shutdown the queue worker. As the queue is empty, @@ -1270,7 +1269,7 @@ tryShutdownWorkersWithinActionTimeout(qqueue_t *pThis) * startup some workers again. So this is OK here. -- rgerhards, 2009-05-28 */ pThis->bEnqOnly = 1; - wtpSetState(pThis->pWtpReg, wtpState_SHUTDOWN_IMMEDIATE); + /* need to set this so that the DA queue begins shutdown in parallel! */ if(pThis->pqDA != NULL) { pThis->pqDA->bEnqOnly = 1; wtpSetState(pThis->pqDA->pWtpReg, wtpState_SHUTDOWN_IMMEDIATE); |