Skip to content

Commit cd8581f

Browse files
revert to necessary @asyncs
1 parent 2749591 commit cd8581f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cluster.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,14 @@ function addprocs_locked(manager::ClusterManager; kwargs...)
490490
# call manager's `launch` is a separate task. This allows the master
491491
# process initiate the connection setup process as and when workers come
492492
# online
493-
t_launch = Threads.@spawn Threads.threadpool() launch(manager, params, launched, launch_ntfy)
493+
# NOTE: Must be `@async`. See FIXME above
494+
t_launch = @async launch(manager, params, launched, launch_ntfy)
494495

495496
@sync begin
496497
while true
497498
if isempty(launched)
498499
istaskdone(t_launch) && break
499-
Threads.@spawn Threads.threadpool() begin
500+
@async begin # NOTE: Must be `@async`. See FIXME above
500501
sleep(1)
501502
notify(launch_ntfy)
502503
end
@@ -506,7 +507,8 @@ function addprocs_locked(manager::ClusterManager; kwargs...)
506507
if !isempty(launched)
507508
wconfig = popfirst!(launched)
508509
let wconfig=wconfig
509-
Threads.@spawn Threads.threadpool() setup_launched_worker(manager, wconfig, launched_q)
510+
# NOTE: Must be `@async`. See FIXME above
511+
@async setup_launched_worker(manager, wconfig, launched_q)
510512
end
511513
end
512514
end

0 commit comments

Comments
 (0)