summaryrefslogtreecommitdiff
path: root/thread_sync.c
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-09-17 17:26:52 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-09-17 17:26:52 +0200
commitd01954632d7cd6574d51c8cc95b832ad5f9de62d (patch)
tree2e1ef36466f9df8dae2a07f3378554c517abeed8 /thread_sync.c
parent264889ec3d3d38fc1fd23c4fb48402f1367a8deb (diff)
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.c1
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 */