diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-26 17:49:26 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-26 17:49:26 +0000 |
commit | eb4b1915d1655d801e0232f4196fbdc1af3c857f (patch) | |
tree | f0527b24b8c28a8f4acba20e5e637edb7a3532e8 /wtp.c | |
parent | 3ae3033800076fca0e9f5f491da2f420b610ffc2 (diff) | |
download | rsyslog-eb4b1915d1655d801e0232f4196fbdc1af3c857f.tar.gz rsyslog-eb4b1915d1655d801e0232f4196fbdc1af3c857f.tar.xz rsyslog-eb4b1915d1655d801e0232f4196fbdc1af3c857f.zip |
worked on queue stability
Diffstat (limited to 'wtp.c')
-rw-r--r-- | wtp.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -333,12 +333,9 @@ wtpCancelAll(wtp_t *pThis) /* go through all workers and cancel those that are active */ for(i = 0 ; i < pThis->iNumWorkerThreads ; ++i) { - /* TODO: mutex lock!*/ - if(pThis->pWrkr[i]->tCurrCmd >= eWRKTHRD_TERMINATING) { - dbgprintf("%s: canceling worker thread %d\n", wtpGetDbgHdr(pThis), i); - pthread_cancel(pThis->pWrkr[i]->thrdID); - ++numCancelled; - } + dbgprintf("%s: try canceling worker thread %d\n", wtpGetDbgHdr(pThis), i); + wtiCancelThrd(pThis->pWrkr[i]); +RUNLOG; } dbgprintf("%s: cancelled %d worker threads\n", wtpGetDbgHdr(pThis), numCancelled); |