We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a53b50 commit 2f22449Copy full SHA for 2f22449
src/sch/Sch.jl
@@ -270,6 +270,12 @@ function init_proc(state, p)
270
state.worker_chans[p.pid] = (inp_chan, out_chan)
271
end
272
273
+function _cleanup_proc(uid)
274
+ empty!(CHUNK_CACHE)
275
+end
276
+function cleanup_proc(state, p)
277
+ remote_do(_cleanup_proc, p.pid, state.uid)
278
279
280
"Process-local count of actively-executing Dagger tasks per processor type."
281
const ACTIVE_TASKS = Dict{UInt64,Dict{Type,Ref{Float64}}}()
@@ -409,6 +415,9 @@ function compute_dag(ctx, d::Thunk; options=SchedulerOptions())
409
415
410
416
safepoint(state)
411
417
418
+ @sync for p in procs_to_use(ctx)
419
+ @async cleanup_proc(state, p)
420
+ end
412
421
value = state.cache[d] # TODO: move(OSProc(), state.cache[d])
413
422
if d in state.errored
414
423
throw(value)
0 commit comments