Skip to content

Commit

Permalink
fixup! Force all domain threads to exit at caml_do_exit time.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustanddreams committed Mar 6, 2024
1 parent 013426f commit f05742e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,7 @@ static void stw_terminate_domain(caml_domain_state *domain, void *data,
if (!pthread_equal(pthread_self(), *(pthread_t *)data)) {
/* Ask the matching backup thread, if started, to terminate. */
atomic_store_release(&domain_self->backup_thread_msg, BT_TERMINATE);
caml_plat_signal(&domain_self->domain_cond);
pthread_exit(0);
}
}
Expand Down

0 comments on commit f05742e

Please sign in to comment.