We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2239ea0 commit 411f214Copy full SHA for 411f214
thread.c
@@ -2750,6 +2750,7 @@ rb_thread_io_close_interrupt(struct rb_io *io)
2750
// This is used to ensure the correct execution context is woken up after the blocking operation is interrupted:
2751
io->wakeup_mutex = rb_mutex_new();
2752
2753
+ // We need to use a mutex here as entering the fiber scheduler may cause a context switch:
2754
VALUE result = rb_mutex_synchronize(io->wakeup_mutex, thread_io_close_notify_all, (VALUE)io);
2755
2756
return (size_t)result;
0 commit comments