aboutsummaryrefslogtreecommitdiffstats
path: root/ext/thread
diff options
context:
space:
mode:
Diffstat (limited to 'ext/thread')
-rw-r--r--ext/thread/thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index befea9ae30..cec8a5b4fa 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -437,7 +437,7 @@ rb_szqueue_max_set(VALUE self, VALUE vmax)
diff = max - GET_SZQUEUE_ULONGMAX(self);
}
RSTRUCT_SET(self, SZQUEUE_MAX, vmax);
- while (diff > 0 && !NIL_P(t = rb_ary_shift(GET_QUEUE_QUE(self)))) {
+ while (diff-- > 0 && !NIL_P(t = rb_ary_shift(GET_SZQUEUE_WAITERS(self)))) {
rb_thread_wakeup_alive(t);
}
return vmax;