Skip to content

Commit

Permalink
Add write barriers to IO_Event_Selector_resume/_raise. (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix authored Oct 21, 2024
1 parent 353befb commit 16b1fa6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/io/event/selector/selector.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 16b1fa6

Please sign in to comment.