Skip to content

Commit

Permalink
fix #50438, use default pool for at-threads (#50845)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Aug 9, 2023
1 parent 9889caf commit 744aa79
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion base/threadingconstructs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ function threading_run(fun, static)
for i = 1:n
t = Task(() -> fun(i)) # pass in tid
t.sticky = static
static && ccall(:jl_set_task_tid, Cint, (Any, Cint), t, tid_offset + i-1)
if static
ccall(:jl_set_task_tid, Cint, (Any, Cint), t, tid_offset + i-1)
else
# TODO: this should be the current pool (except interactive) if there
# are ever more than two pools.
ccall(:jl_set_task_threadpoolid, Cint, (Any, Int8), t, _sym_to_tpid(:default))
end
tasks[i] = t
schedule(t)
end
Expand Down

0 comments on commit 744aa79

Please sign in to comment.