diff --git a/ext/io/event/selector/selector.c b/ext/io/event/selector/selector.c index fc49332..03102c9 100644 --- a/ext/io/event/selector/selector.c +++ b/ext/io/event/selector/selector.c @@ -233,6 +233,8 @@ VALUE IO_Event_Selector_resume(struct IO_Event_Selector *backend, int argc, VALU .fiber = rb_fiber_current() }; + RB_OBJ_WRITTEN(backend->self, Qundef, waiting.fiber); + queue_push(backend, &waiting); struct wait_and_transfer_arguments arguments = { @@ -266,6 +268,8 @@ VALUE IO_Event_Selector_raise(struct IO_Event_Selector *backend, int argc, VALUE .fiber = rb_fiber_current() }; + RB_OBJ_WRITTEN(backend->self, Qundef, waiting.fiber); + queue_push(backend, &waiting); struct wait_and_transfer_arguments arguments = {