Delay background_thread_ctl_init to right before thread creation.

ctl_init sets isthreaded, which means it should be done without holding any
locks.
This commit is contained in:
Qi Wang 2017-10-04 16:39:33 -07:00 committed by Qi Wang
parent 79e83451ff
commit a2e6eb2c22
2 changed files with 6 additions and 4 deletions

View file

@ -848,9 +848,6 @@ background_thread_boot1(tsdn_t *tsdn) {
malloc_mutex_rank_exclusive)) {
return true;
}
if (opt_background_thread) {
background_thread_ctl_init(tsdn);
}
background_thread_info = (background_thread_info_t *)base_alloc(tsdn,
b0get(), ncpus * sizeof(background_thread_info_t), CACHELINE);