Skip to content

Commit

Permalink
Unset flzr_can_work before doing the work
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-hughes committed Aug 22, 2024
1 parent d281df7 commit 220bc1f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions reclaim.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,11 +893,9 @@ static void* init_finalize_thread(void *arg)
while (flzr_can_work == 0) {
pthread_cond_wait(&flzr_t_has_work, &flzr_mtx);
}
pthread_mutex_unlock(&flzr_mtx);
GC_invoke_finalizers();
pthread_mutex_lock(&flzr_mtx);
flzr_can_work = 0;
pthread_mutex_unlock(&flzr_mtx);
GC_invoke_finalizers();
}
return arg;
}
Expand Down

0 comments on commit 220bc1f

Please sign in to comment.