summaryrefslogtreecommitdiff
path: root/mjit_worker.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-19 13:47:02 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-19 13:47:02 +0000
commit4765da9c589d7d4f879d93add49c87d74064b364 (patch)
tree7e3a61945809a1065f1ff975e5ae447f400d5444 /mjit_worker.c
parenta9025c884180e446e0607981cf61fe4b1d86d046 (diff)
downloadruby-4765da9c589d7d4f879d93add49c87d74064b364.tar.gz
mjit_worker.c: don't compile more than max_cache_size
Prior to this commit, max_cache_size + 1 methods could be active. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index a230ae823d..d9ca5a250f 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -1187,7 +1187,7 @@ mjit_worker(void)
/* wait until unit is available */
CRITICAL_SECTION_START(3, "in worker dequeue");
- while ((unit_queue.head == NULL || active_units.length > mjit_opts.max_cache_size) && !stop_worker_p) {
+ while ((unit_queue.head == NULL || active_units.length >= mjit_opts.max_cache_size) && !stop_worker_p) {
rb_native_cond_wait(&mjit_worker_wakeup, &mjit_engine_mutex);
verbose(3, "Getting wakeup from client");
}