@@ -163,10 +163,10 @@ function check_worker_state(w::Worker)
163
163
else
164
164
w. ct_time = time ()
165
165
if myid () > w. id
166
- t = Threads. @spawn Threads . threadpool () exec_conn_func (w)
166
+ t = Threads. @spawn exec_conn_func (w)
167
167
else
168
168
# route request via node 1
169
- t = Threads. @spawn Threads . threadpool () remotecall_fetch ((p,to_id) -> remotecall_fetch (exec_conn_func, p, to_id), 1 , w. id, myid ())
169
+ t = Threads. @spawn remotecall_fetch ((p,to_id) -> remotecall_fetch (exec_conn_func, p, to_id), 1 , w. id, myid ())
170
170
end
171
171
errormonitor (t)
172
172
wait_for_conn (w)
@@ -323,7 +323,7 @@ function read_worker_host_port(io::IO)
323
323
leader = String[]
324
324
try
325
325
while ntries > 0
326
- readtask = Threads. @spawn Threads . threadpool () readline (io)
326
+ readtask = Threads. @spawn readline (io)
327
327
yield ()
328
328
while ! istaskdone (readtask) && ((time_ns () - t0) < timeout)
329
329
sleep (0.05 )
@@ -490,13 +490,13 @@ function addprocs_locked(manager::ClusterManager; kwargs...)
490
490
# call manager's `launch` is a separate task. This allows the master
491
491
# process initiate the connection setup process as and when workers come
492
492
# online
493
- t_launch = Threads. @spawn Threads . threadpool () launch (manager, params, launched, launch_ntfy)
493
+ t_launch = Threads. @spawn launch (manager, params, launched, launch_ntfy)
494
494
495
495
@sync begin
496
496
while true
497
497
if isempty (launched)
498
498
istaskdone (t_launch) && break
499
- Threads. @spawn Threads . threadpool () begin
499
+ Threads. @spawn begin
500
500
sleep (1 )
501
501
notify (launch_ntfy)
502
502
end
@@ -506,7 +506,7 @@ function addprocs_locked(manager::ClusterManager; kwargs...)
506
506
if ! isempty (launched)
507
507
wconfig = popfirst! (launched)
508
508
let wconfig= wconfig
509
- Threads. @spawn Threads . threadpool () setup_launched_worker (manager, wconfig, launched_q)
509
+ Threads. @spawn setup_launched_worker (manager, wconfig, launched_q)
510
510
end
511
511
end
512
512
end
@@ -586,7 +586,7 @@ function launch_n_additional_processes(manager, frompid, fromconfig, cnt, launch
586
586
wconfig. port = port
587
587
588
588
let wconfig= wconfig
589
- Threads. @spawn Threads . threadpool () begin
589
+ Threads. @spawn begin
590
590
pid = create_worker (manager, wconfig)
591
591
remote_do (redirect_output_from_additional_worker, frompid, pid, port)
592
592
push! (launched_q, pid)
@@ -1044,13 +1044,13 @@ function rmprocs(pids...; waitfor=typemax(Int))
1044
1044
1045
1045
pids = vcat (pids... )
1046
1046
if waitfor == 0
1047
- t = Threads. @spawn Threads . threadpool () _rmprocs (pids, typemax (Int))
1047
+ t = Threads. @spawn _rmprocs (pids, typemax (Int))
1048
1048
yield ()
1049
1049
return t
1050
1050
else
1051
1051
_rmprocs (pids, waitfor)
1052
1052
# return a dummy task object that user code can wait on.
1053
- return Threads. @spawn Threads . threadpool () nothing
1053
+ return Threads. @spawn nothing
1054
1054
end
1055
1055
end
1056
1056
@@ -1233,7 +1233,7 @@ function interrupt(pids::AbstractVector=workers())
1233
1233
@assert myid () == 1
1234
1234
@sync begin
1235
1235
for pid in pids
1236
- Threads. @spawn Threads . threadpool () interrupt (pid)
1236
+ Threads. @spawn interrupt (pid)
1237
1237
end
1238
1238
end
1239
1239
end
0 commit comments