Skip to content

Commit b0cfba7

Browse files
committed
fixup! fixup! Various alloc reductions and optimizations
1 parent 047347a commit b0cfba7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/sch/util.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function errormonitor_tracked_set!(name::String, t::Task)
2626
return
2727
end
2828
end
29+
error("Task not found in tracked list")
2930
end
3031
end
3132
const ERRORMONITOR_TRACKED = LockedObject(Pair{String,Task}[])

src/utils/reuse.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,11 @@ function (cache::ReusableTaskCache)(f, name::String)
545545
Sch.errormonitor_tracked_set!(name, cache.tasks[idx])
546546
return cache.tasks[idx]
547547
else
548-
t = Task(()->f)
548+
t = @task try
549+
@invokelatest f()
550+
catch err
551+
@error "[$r] Error in non-reusable task" exception=(err, catch_backtrace())
552+
end
549553
cache.setup_f(t)
550554
schedule(t)
551555
Sch.errormonitor_tracked(name, t)

0 commit comments

Comments
 (0)