From 4724bf856f30e8cc56795c0dc23b96e7ae68e874 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sun, 3 Jan 2021 00:05:00 -0800 Subject: Avoid hanging on --jit-wait after MJIT.pause When a worker is stopped, nobody will JIT a method for you. --- mjit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mjit.c') diff --git a/mjit.c b/mjit.c index b98f742068..4dad74641b 100644 --- a/mjit.c +++ b/mjit.c @@ -328,6 +328,9 @@ mjit_wait(struct rb_iseq_constant_body *body) VALUE rb_mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body) { + if (worker_stopped) + return Qundef; + mjit_wait(body); if ((uintptr_t)body->jit_func <= (uintptr_t)LAST_JIT_ISEQ_FUNC) { return Qundef; -- cgit v1.2.3