Skip to content

Commit

Permalink
add GC call (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 authored Jan 8, 2023
1 parent 4c2f059 commit c3b60fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MEDYANSimRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,12 @@ Comonicon.@cast function run(input_dir::AbstractString, output_dir::AbstractStri
status, result = run_with_timeout(worker, timeout, quote
copy!(Random.default_rng(), worker_rng_copy)
state = UserCode.loop(step, state)
yield()
step += 1
state = save_load_snapshot_dir(step, jobout, worker_rng_str, state)
isdone::Bool, expected_final_step::Int64 = UserCode.done(step, state)
copy!(worker_rng_copy, Random.default_rng())
GC.gc() # TODO: remove this when Julia v1.9 is released
isdone, expected_final_step, worker_rng_str[]
end)
step += 1
Expand Down

0 comments on commit c3b60fc

Please sign in to comment.