aboutsummaryrefslogtreecommitdiffstats
path: root/mjit.c
diff options
context:
space:
mode:
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mjit.c b/mjit.c
index 87b4a3e990..6ae68e30b7 100644
--- a/mjit.c
+++ b/mjit.c
@@ -647,7 +647,7 @@ mjit_pause(int wait_p)
tv.tv_sec = 0;
tv.tv_usec = 1000;
- while (unit_queue.length > 0) {
+ while (unit_queue.length > 0 && active_units.length < mjit_opts.max_cache_size) { /* inverse of condition that waits for mjit_worker_wakeup */
CRITICAL_SECTION_START(3, "in mjit_pause for a worker wakeup");
rb_native_cond_broadcast(&mjit_worker_wakeup);
CRITICAL_SECTION_FINISH(3, "in mjit_pause for a worker wakeup");