summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/thread/thread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index 43dfc348ed..3dba9ba32a 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -422,9 +422,8 @@ lock_mutex(Mutex *mutex)
mutex->owner = current;
}
else {
- push_list(&mutex->waiting, current);
do {
- rb_thread_stop();
+ wait_list(&mutex->waiting);
rb_thread_critical = 1;
if (!MUTEX_LOCKED_P(mutex)) {
mutex->owner = current;