diff options
| author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2025-06-24 14:55:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-24 05:55:07 +0000 |
| commit | ba68343d3ad0465ae9cdaf786dd100b9ed0add07 (patch) | |
| tree | a9042db2e3c60beb08de741277f2564495033b94 /thread.c | |
| parent | e036d4da8dc99959cb8c4da4d51976930271c618 (diff) | |
Allow wakeup mutex to be used in trap context. (#13684)
Diffstat (limited to 'thread.c')
| -rw-r--r-- | thread.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2847,6 +2847,7 @@ rb_thread_io_close_interrupt(struct rb_io *io) // This is used to ensure the correct execution context is woken up after the blocking operation is interrupted: io->wakeup_mutex = rb_mutex_new(); + rb_mutex_allow_trap(io->wakeup_mutex, 1); // We need to use a mutex here as entering the fiber scheduler may cause a context switch: VALUE result = rb_mutex_synchronize(io->wakeup_mutex, thread_io_close_notify_all, (VALUE)io); |
