summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cont.c b/cont.c
index fc0cf53655..774a026bd5 100644
--- a/cont.c
+++ b/cont.c
@@ -1260,8 +1260,9 @@ rb_fiber_start(void)
th->errinfo = Qnil;
th->root_lep = rb_vm_ep_local_ep(proc->block.ep);
th->root_svar = Qfalse;
-
fib->status = RUNNING;
+
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, Qnil);
cont->value = rb_vm_invoke_proc(th, proc, argc, argv, 0);
}
TH_POP_TAG();
@@ -1451,6 +1452,8 @@ fiber_switch(rb_fiber_t *fib, int argc, const VALUE *argv, int is_resume)
value = fiber_store(fib, th);
RUBY_VM_CHECK_INTS(th);
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, Qnil);
+
return value;
}