Fix handling of cancelled blocking operations. (#13570)

This commit is contained in:
Samuel Williams 2025-06-10 16:30:43 +09:00 committed by GitHub
parent 20adae4ad6
commit cdeedd5bc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2025-06-10 07:30:57 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>

View File

@ -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;
}