From c4841ca6e09f161a015419dd2e3c7d86d0f9520a Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Sat, 13 Apr 2019 14:26:01 -0400 Subject: [PATCH] fix #31702, thread sitting in event loop outside thread region (#31709) --- src/threading.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/threading.c b/src/threading.c index d17da19d96007..936994424ad87 100644 --- a/src/threading.c +++ b/src/threading.c @@ -525,6 +525,8 @@ JL_DLLEXPORT void jl_threading_run(jl_value_t *func) jl_apply(args, 2); } _threadedregion -= 1; + // make sure no threads are sitting in the event loop + jl_wake_libuv(); JL_GC_POP(); jl_gc_unsafe_leave(ptls, gc_state); }