From b3978e7f7381c694a30a83c67c3fe2e1acc54207 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 20 Jul 2009 09:47:12 +0200 Subject: more cleanup/simplification (forgot to remove one mutex lock) --- runtime/queue.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'runtime/queue.c') diff --git a/runtime/queue.c b/runtime/queue.c index 0ef0174e..9123a3f5 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1289,17 +1289,15 @@ tryShutdownWorkersWithinActionTimeout(qqueue_t *pThis) d_pthread_mutex_lock(pThis->mut); if(pThis->bRunsDA) { d_pthread_mutex_unlock(pThis->mut); - if(wtpGetCurNumWrkr(pThis->pqDA->pWtpReg, LOCK_MUTEX) > 0) { - /* and now the same for the DA queue */ - dbgoprint((obj_t*) pThis, "trying immediate shutdown of DA queue workers\n"); - iRetLocal = wtpShutdownAll(pThis->pqDA->pWtpReg, wtpState_SHUTDOWN_IMMEDIATE, &tTimeout); - if(iRetLocal == RS_RET_TIMED_OUT) { - dbgoprint((obj_t*) pThis, "immediate shutdown timed out on DA queue (this is acceptable " - "and triggers cancellation)\n"); - } else if(iRetLocal != RS_RET_OK) { - dbgoprint((obj_t*) pThis, "unexpected iRet state %d after trying immediate shutdown of the DA " - "queue in disk save mode. Continuing, but results are unpredictable\n", iRetLocal); - } + /* and now the same for the DA queue */ + dbgoprint((obj_t*) pThis, "trying immediate shutdown of DA queue workers\n"); + iRetLocal = wtpShutdownAll(pThis->pqDA->pWtpReg, wtpState_SHUTDOWN_IMMEDIATE, &tTimeout); + if(iRetLocal == RS_RET_TIMED_OUT) { + dbgoprint((obj_t*) pThis, "immediate shutdown timed out on DA queue (this is acceptable " + "and triggers cancellation)\n"); + } else if(iRetLocal != RS_RET_OK) { + dbgoprint((obj_t*) pThis, "unexpected iRet state %d after trying immediate shutdown of the DA " + "queue in disk save mode. Continuing, but results are unpredictable\n", iRetLocal); } } else { d_pthread_mutex_unlock(pThis->mut); -- cgit