diff options
author | Luke Gruber <[email protected]> | 2024-05-05 11:14:53 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-05 15:14:53 +0000 |
commit | 6747fbe77dcac26a457bb1386f55f3c27321040a (patch) | |
tree | 47cc7e025b25e12cb910c6aa5c0ac4da7a4a0737 /ractor.c | |
parent | 5398a46889fc98c734c00d8d71439b1ffc2912c1 (diff) |
Fix interrupts during Ractor.select
Fixes [Bug #20168]
Diffstat (limited to 'ractor.c')
-rw-r--r-- | ractor.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1804,17 +1804,17 @@ ractor_select_internal(rb_execution_context_t *ec, VALUE self, VALUE ractors, VA int state; EC_PUSH_TAG(ec); - if ((state = EC_EXEC_TAG() == TAG_NONE)) { + if ((state = EC_EXEC_TAG()) == TAG_NONE) { result = ractor_selector__wait(selector, do_receive, do_yield, yield_value, move); } - else { + EC_POP_TAG(); + if (state != TAG_NONE) { // ensure ractor_selector_clear(selector); // jump EC_JUMP_TAG(ec, state); } - EC_POP_TAG(); RB_GC_GUARD(ractors); return result; |