1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
k0kubun 2018-10-19 13:47:02 +00:00
parent a9025c8841
commit 4765da9c58

View file

@ -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");
}