Skip to content

Commit

Permalink
Don't check for thread in gc_sweep_page
Browse files Browse the repository at this point in the history
We should always have a thread when we sweep so we don't need to check
that it exists.
  • Loading branch information
peterzhu2118 committed Apr 16, 2024
1 parent f06670c commit e5df889
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5462,10 +5462,7 @@ gc_sweep_page(rb_objspace_t *objspace, rb_heap_t *heap, struct gc_sweep_context
sweep_page->size_pool->total_freed_objects += ctx->freed_slots;

if (heap_pages_deferred_final && !finalizing) {
rb_thread_t *th = GET_THREAD();
if (th) {
gc_finalize_deferred_register(objspace);
}
gc_finalize_deferred_register(objspace);
}

#if RGENGC_CHECK_MODE
Expand Down

0 comments on commit e5df889

Please sign in to comment.