Skip to content

Commit 44913e8

Browse files
committed
ThreadProc: Use at-invokelatest
1 parent 284a374 commit 44913e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/processor.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
export OSProc, Context, addprocs!, rmprocs!
22

3+
import Base: @invokelatest
4+
35
"""
46
Processor
57
@@ -157,7 +159,7 @@ function execute!(proc::ThreadProc, @nospecialize(f), @nospecialize(args...))
157159
task = Task() do
158160
set_tls!(tls)
159161
TimespanLogging.prof_task_put!(tls.sch_handle.thunk_id.id)
160-
f(args...)
162+
@invokelatest f(args...)
161163
end
162164
task.sticky = true
163165
ret = ccall(:jl_set_task_tid, Cint, (Any, Cint), task, proc.tid-1)

0 commit comments

Comments
 (0)