mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-25 02:42:33 -05:00
- Access netmgr worker->finished under worker lock only
- Join network worker thread to silence tsan
This commit is contained in:
parent
d0bc45be17
commit
bf2cc19b04
1 changed files with 3 additions and 1 deletions
|
|
@ -198,6 +198,7 @@ nm_destroy(isc_nm_t **mgr0) {
|
|||
int r = uv_loop_close(&mgr->workers[i].loop);
|
||||
INSIST(r == 0);
|
||||
isc_queue_destroy(mgr->workers[i].ievents);
|
||||
isc_thread_join(mgr->workers[i].thread, NULL);
|
||||
}
|
||||
|
||||
isc_condition_destroy(&mgr->wkstatecond);
|
||||
|
|
@ -424,9 +425,10 @@ nm_thread(void *worker0) {
|
|||
atomic_store(&worker->mgr->paused, false);
|
||||
}
|
||||
}
|
||||
bool finished = worker->finished;
|
||||
UNLOCK(&worker->lock);
|
||||
|
||||
if (worker->finished) {
|
||||
if (finished) {
|
||||
/*
|
||||
* We need to launch the loop one more time
|
||||
* in UV_RUN_NOWAIT mode to make sure that
|
||||
|
|
|
|||
Loading…
Reference in a new issue