We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82beae6 commit b9fc7f1Copy full SHA for b9fc7f1
1 file changed
lib/misc/threadpool/threadpool.c
@@ -591,11 +591,15 @@ lws_threadpool_worker(void *d)
591
lws_usec_t then;
592
int n;
593
594
- if (tp->destroying || !task_to_wsi(task)) {
+ pthread_mutex_lock(&tp->lock); /* =================== tp lock */
595
+
596
+ if (tp->destroying || !task_to_wsi(task)) { /* cov */
597
lwsl_info("%s: stopping on wsi gone\n", __func__);
598
state_transition(task, LWS_TP_STATUS_STOPPING);
599
}
600
601
+ pthread_mutex_unlock(&tp->lock); /* --------------- tp unlock */
602
603
then = lws_now_usecs();
604
n = (int)task->args.task(task->args.user, task->status);
605
lwsl_debug(" %d, status %d\n", n, task->status);
0 commit comments