summaryrefslogtreecommitdiffstats
path: root/runtime/wti.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/wti.c')
-rw-r--r--runtime/wti.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/wti.c b/runtime/wti.c
index 900e1cba..c295ccc9 100644
--- a/runtime/wti.c
+++ b/runtime/wti.c
@@ -289,10 +289,12 @@ wtiWorker(wti_t *pThis)
}
/* indicate termination */
+ d_pthread_mutex_lock(pWtp->pmutUsr);
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave);
pthread_cleanup_pop(0); /* remove cleanup handler */
pWtp->pfOnWorkerShutdown(pWtp->pUsr);
pthread_setcancelstate(iCancelStateSave, NULL);
+ d_pthread_mutex_unlock(pWtp->pmutUsr);
RETiRet;
}