Skip to content

Commit b5dcd9d

Browse files
committed
fixup! debug
1 parent 1cd4a86 commit b5dcd9d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/cluster.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -1058,22 +1058,22 @@ julia> workers()
10581058
6
10591059
```
10601060
"""
1061-
function rmprocs(pids...; waitfor=typemax(Int))
1061+
function rmprocs(pids...; exit_timeout=15, waitfor=typemax(Int))
10621062
cluster_mgmt_from_master_check()
10631063

10641064
pids = vcat(pids...)
10651065
if waitfor == 0
1066-
t = @async _rmprocs(pids, typemax(Int))
1066+
t = @async _rmprocs(pids, typemax(Int), exit_timeout)
10671067
yield()
10681068
return t
10691069
else
1070-
_rmprocs(pids, waitfor)
1070+
_rmprocs(pids, waitfor, exit_timeout)
10711071
# return a dummy task object that user code can wait on.
10721072
return @async nothing
10731073
end
10741074
end
10751075

1076-
function _rmprocs(pids, waitfor)
1076+
function _rmprocs(pids, waitfor, exit_timeout)
10771077
lock(worker_lock)
10781078
try
10791079
rmprocset = Union{LocalProcess, Worker}[]
@@ -1084,7 +1084,7 @@ function _rmprocs(pids, waitfor)
10841084
if haskey(map_pid_wrkr, p)
10851085
w = map_pid_wrkr[p]
10861086
set_worker_state(w, W_TERMINATING)
1087-
kill(w.manager, p, w.config)
1087+
kill(w.manager, p, w.config; exit_timeout)
10881088
push!(rmprocset, w)
10891089
end
10901090
end

src/managers.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ It should cause the remote worker specified by `pid` to exit.
749749
`kill(manager::ClusterManager.....)` executes a remote `exit()`
750750
on `pid`.
751751
"""
752-
function kill(manager::ClusterManager, pid::Int, config::WorkerConfig)
752+
function kill(manager::ClusterManager, pid::Int, config::WorkerConfig; kwargs...)
753753
remote_do(exit, pid)
754754
nothing
755755
end

test/topology.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ using Random
140140

141141
@info "finished master-worker"
142142
# With lazy=false, all connections ought to be setup during `addprocs`
143-
nprocs() > 1 && rmprocs(workers())
143+
nprocs() > 1 && rmprocs(workers(); exit_timeout=30)
144144
addprocs_with_testenv(8; lazy=false)
145145
def_count_conn()
146146
@test sum(asyncmap(p->remotecall_fetch(count_connected_workers,p), workers())) == 64

0 commit comments

Comments
 (0)