Skip to content

Commit

Permalink
At exit, disable GC before running finalizers
Browse files Browse the repository at this point in the history
  • Loading branch information
kpamnany committed Sep 26, 2023
1 parent 8de80bd commit 424e07d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,10 @@ JL_DLLEXPORT void jl_atexit_hook(int exitcode) JL_NOTSAFEPOINT_ENTER
JL_STDOUT = (uv_stream_t*) STDOUT_FILENO;
JL_STDERR = (uv_stream_t*) STDERR_FILENO;

if (ct)
if (ct) {
jl_gc_enable(0);
jl_gc_run_all_finalizers(ct);
}

uv_loop_t *loop = jl_global_event_loop();
if (loop != NULL) {
Expand Down

0 comments on commit 424e07d

Please sign in to comment.