don't reset a segment thread id when iterating

This commit is contained in:
daanx 2024-06-03 18:25:22 -07:00
parent 065f46cefb
commit 3f69119936
1 changed files with 1 additions and 2 deletions

View File

@ -82,8 +82,7 @@ static bool mi_arena_segment_os_clear_abandoned(mi_segment_t* segment, bool take
segment->abandoned_os_prev = NULL;
mi_atomic_decrement_relaxed(&subproc->abandoned_count);
mi_atomic_decrement_relaxed(&subproc->abandoned_os_list_count);
if (take_lock) {
// don't set the thread_id when iterating
if (take_lock) { // don't reset the thread_id when iterating
mi_atomic_store_release(&segment->thread_id, _mi_thread_id());
}
reclaimed = true;