summaryrefslogtreecommitdiff
path: root/ractor.c
diff options
context:
space:
mode:
authorLuke Gruber <[email protected]>2024-05-05 11:14:53 -0400
committerGitHub <[email protected]>2024-05-05 15:14:53 +0000
commit6747fbe77dcac26a457bb1386f55f3c27321040a (patch)
tree47cc7e025b25e12cb910c6aa5c0ac4da7a4a0737 /ractor.c
parent5398a46889fc98c734c00d8d71439b1ffc2912c1 (diff)
Fix interrupts during Ractor.select
Fixes [Bug #20168]
Diffstat (limited to 'ractor.c')
-rw-r--r--ractor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ractor.c b/ractor.c
index f6b2b22c9a..231a83db6f 100644
--- a/ractor.c
+++ b/ractor.c
@@ -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;