We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb01f91 commit e1e3d4fCopy full SHA for e1e3d4f
src/signals-unix.c
@@ -1033,6 +1033,10 @@ static void *signal_listener(void *arg)
1033
}
1034
#endif
1035
if (doexit) {
1036
+ // Let's forbid threads from running GC while we're trying to exit,
1037
+ // also let's make sure we're not in the middle of GC.
1038
+ jl_atomic_fetch_add(&jl_gc_disable_counter, 1);
1039
+ jl_safepoint_wait_gc(NULL);
1040
// The exit can get stuck if it happens at an unfortunate spot in thread 0
1041
// (unavoidable due to its async nature).
1042
// Try much harder to exit next time, if we get multiple exit requests.
0 commit comments