summaryrefslogtreecommitdiffstats
path: root/wtp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-26 17:49:26 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-26 17:49:26 +0000
commiteb4b1915d1655d801e0232f4196fbdc1af3c857f (patch)
treef0527b24b8c28a8f4acba20e5e637edb7a3532e8 /wtp.c
parent3ae3033800076fca0e9f5f491da2f420b610ffc2 (diff)
downloadrsyslog-eb4b1915d1655d801e0232f4196fbdc1af3c857f.tar.gz
rsyslog-eb4b1915d1655d801e0232f4196fbdc1af3c857f.tar.xz
rsyslog-eb4b1915d1655d801e0232f4196fbdc1af3c857f.zip
worked on queue stability
Diffstat (limited to 'wtp.c')
-rw-r--r--wtp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/wtp.c b/wtp.c
index 90f1a599..b1745865 100644
--- a/wtp.c
+++ b/wtp.c
@@ -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);