From 5d8f112505fbc3f9b008ce4ec40fc74f9f623c4a Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 26 Sep 2019 12:53:41 +0900 Subject: RubyVM::MJIT.pause(wait: true) should wait for all compilations and compaction. Prior to this commit, the last-compiled code has not been used because MJIT worker is stopped before setting the code, and compaction has also been skipped. But it was not intentional and `wait: true` pause should wait until those two things by its feature. --- mjit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mjit.c') diff --git a/mjit.c b/mjit.c index 3ae9410179..69dc23442b 100644 --- a/mjit.c +++ b/mjit.c @@ -802,7 +802,9 @@ mjit_pause(bool wait_p) } } + mjit_pause_wait_p = wait_p; // Avoid cancelling the last compilation after the unit fetch if wait_p. stop_worker(); + mjit_pause_wait_p = false; return Qtrue; } -- cgit v1.2.3