Skip to content

Commit c9d38b7

Browse files
committed
Use rb_gc_get_ec in rb_gc_event_hook
This would allow rb_gc_event_hook to run in a GC thread that is a non-Ruby thread.
1 parent 7ced2c8 commit c9d38b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ rb_gc_event_hook(VALUE obj, rb_event_flag_t event)
239239
{
240240
if (LIKELY(!rb_gc_event_hook_required_p(event))) return;
241241

242-
rb_execution_context_t *ec = GET_EC();
242+
rb_execution_context_t *ec = rb_gc_get_ec();
243243
if (!ec->cfp) return;
244244

245245
EXEC_EVENT_HOOK(ec, event, ec->cfp->self, 0, 0, 0, obj);

0 commit comments

Comments
 (0)