summaryrefslogtreecommitdiff
path: root/scheduler.c
diff options
context:
space:
mode:
authorSamuel Williams <[email protected]>2025-06-10 16:30:43 +0900
committerGitHub <[email protected]>2025-06-10 07:30:43 +0000
commitcdeedd5bc1a3c712f7f7b8c2409906a0b5ed9e37 (patch)
tree169489b6771c4670801042ee95e27732855b3892 /scheduler.c
parent20adae4ad6c20aa5918e00f60e956fe9051a7ead (diff)
Fix handling of cancelled blocking operations. (#13570)
Notes
Notes: Merged-By: ioquatix <[email protected]>
Diffstat (limited to 'scheduler.c')
-rw-r--r--scheduler.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/scheduler.c b/scheduler.c
index 80c0278933..11faca01d3 100644
--- a/scheduler.c
+++ b/scheduler.c
@@ -1061,9 +1061,8 @@ VALUE rb_fiber_scheduler_blocking_operation_wait(VALUE scheduler, void* (*functi
operation->data2 = NULL;
operation->unblock_function = NULL;
- // If the blocking operation was never executed, return Qundef to signal
- // the caller to use rb_nogvl instead
- if (current_status != RB_FIBER_SCHEDULER_BLOCKING_OPERATION_STATUS_COMPLETED) {
+ // If the blocking operation was never executed, return Qundef to signal the caller to use rb_nogvl instead
+ if (current_status == RB_FIBER_SCHEDULER_BLOCKING_OPERATION_STATUS_QUEUED) {
return Qundef;
}