diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-09-17 17:26:52 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-09-17 17:26:52 +0200 |
commit | d01954632d7cd6574d51c8cc95b832ad5f9de62d (patch) | |
tree | 2e1ef36466f9df8dae2a07f3378554c517abeed8 /thread_sync.c | |
parent | 264889ec3d3d38fc1fd23c4fb48402f1367a8deb (diff) | |
download | ruby-d01954632d7cd6574d51c8cc95b832ad5f9de62d.tar.gz |
Add missing goto found;
* To still remove the lock from the Thread's list of acquired locks.
* Also to not wake up other waiters and preserve blocking behavior.
Diffstat (limited to 'thread_sync.c')
-rw-r--r-- | thread_sync.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/thread_sync.c b/thread_sync.c index 10ff9c49b1..67d796233c 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -402,6 +402,7 @@ rb_mutex_unlock_th(rb_mutex_t *mutex, rb_thread_t *th, rb_fiber_t *fiber) if (cur->th->scheduler != Qnil) { rb_scheduler_unblock(cur->th->scheduler, cur->self, rb_fiberptr_self(cur->fiber)); + goto found; } else { switch (cur->th->status) { case THREAD_RUNNABLE: /* from someone else calling Thread#run */ |