diff options
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 00f811a0..3fae4aa7 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -2092,7 +2092,6 @@ queueEnqObj(queue_t *pThis, flowControl_t flowCtlType, void *pUsr) { DEFiRet; int iCancelStateSave; - int i; struct timespec t; ISOBJ_TYPE_assert(pThis, queue); @@ -2115,7 +2114,6 @@ queueEnqObj(queue_t *pThis, flowControl_t flowCtlType, void *pUsr) if(pThis->bIsDA) CHKiRet(queueChkStrtDA(pThis)); - /* handle flow control * There are two different flow control mechanisms: basic and advanced flow control. * Basic flow control has always been implemented and protects the queue structures @@ -2172,17 +2170,14 @@ queueEnqObj(queue_t *pThis, flowControl_t flowCtlType, void *pUsr) finalize_it: if(pThis->qType != QUEUETYPE_DIRECT) { + /* make sure at least one worker is running. */ + queueAdviseMaxWorkers(pThis); + dbgoprint((obj_t*) pThis, "EnqueueMsg advised worker start\n"); + /* and release the mutex */ d_pthread_mutex_unlock(pThis->mut); - i = pthread_cond_signal(&pThis->notEmpty); - dbgoprint((obj_t*) pThis, "EnqueueMsg signaled condition (%d)\n", i); pthread_setcancelstate(iCancelStateSave, NULL); } - /* make sure at least one worker is running. */ - if(pThis->qType != QUEUETYPE_DIRECT) { - queueAdviseMaxWorkers(pThis); - } - RETiRet; } |