@@ -1058,22 +1058,22 @@ julia> workers()
1058
1058
6
1059
1059
```
1060
1060
"""
1061
- function rmprocs (pids... ; waitfor= typemax (Int))
1061
+ function rmprocs (pids... ; exit_timeout = 15 , waitfor= typemax (Int))
1062
1062
cluster_mgmt_from_master_check ()
1063
1063
1064
1064
pids = vcat (pids... )
1065
1065
if waitfor == 0
1066
- t = @async _rmprocs (pids, typemax (Int))
1066
+ t = @async _rmprocs (pids, typemax (Int), exit_timeout )
1067
1067
yield ()
1068
1068
return t
1069
1069
else
1070
- _rmprocs (pids, waitfor)
1070
+ _rmprocs (pids, waitfor, exit_timeout )
1071
1071
# return a dummy task object that user code can wait on.
1072
1072
return @async nothing
1073
1073
end
1074
1074
end
1075
1075
1076
- function _rmprocs (pids, waitfor)
1076
+ function _rmprocs (pids, waitfor, exit_timeout )
1077
1077
lock (worker_lock)
1078
1078
try
1079
1079
rmprocset = Union{LocalProcess, Worker}[]
@@ -1084,7 +1084,7 @@ function _rmprocs(pids, waitfor)
1084
1084
if haskey (map_pid_wrkr, p)
1085
1085
w = map_pid_wrkr[p]
1086
1086
set_worker_state (w, W_TERMINATING)
1087
- kill (w. manager, p, w. config)
1087
+ kill (w. manager, p, w. config; exit_timeout )
1088
1088
push! (rmprocset, w)
1089
1089
end
1090
1090
end
0 commit comments