@@ -1014,7 +1014,7 @@ not specified.
10141014
10151015The callback will be called with the worker ID, the final
10161016`Distributed.WorkerState` of the worker, and the last status of the worker as
1017- set by [`setstatus`](@ref), e.g. `f(w::Int, state, status)`. `state` is an
1017+ set by [`setstatus! `](@ref), e.g. `f(w::Int, state, status)`. `state` is an
10181018enum, a value of `WorkerState_terminated` means a graceful exit and a value of
10191019`WorkerState_exterminated` means the worker died unexpectedly.
10201020
@@ -1210,7 +1210,7 @@ Identical to [`workers()`](@ref) except that the current worker is filtered out.
12101210other_workers () = filter (!= (myid ()), workers ())
12111211
12121212"""
1213- setstatus(x, pid::Int=myid())
1213+ setstatus! (x, pid::Int=myid())
12141214
12151215Set the status for worker `pid` to `x`. `x` may be any serializable object but
12161216it's recommended to keep it small enough to cheaply send over a network. The
@@ -1223,22 +1223,22 @@ worker was last doing before it died.
12231223
12241224# Examples
12251225```julia-repl
1226- julia> DistributedNext.setstatus("working on dataset 42")
1226+ julia> DistributedNext.setstatus! ("working on dataset 42")
12271227"working on dataset 42"
12281228
12291229julia> DistributedNext.getstatus()
12301230"working on dataset 42"
12311231```
12321232"""
1233- function setstatus (x, pid:: Int = myid ())
1233+ function setstatus! (x, pid:: Int = myid ())
12341234 if pid ∉ procs ()
12351235 throw (ArgumentError (" Worker $(pid) does not exist, cannot set its status" ))
12361236 end
12371237
12381238 if myid () == 1
12391239 @lock map_pid_statuses_lock map_pid_statuses[pid] = x
12401240 else
1241- remotecall_fetch (setstatus, 1 , x, myid ())
1241+ remotecall_fetch (setstatus! , 1 , x, myid ())
12421242 end
12431243end
12441244
@@ -1248,7 +1248,7 @@ _getstatus(pid) = @lock map_pid_statuses_lock get!(map_pid_statuses, pid, nothin
12481248 getstatus(pid::Int=myid())
12491249
12501250Get the status for worker `pid`. If one was never explicitly set with
1251- [`setstatus`](@ref) this will return `nothing`.
1251+ [`setstatus! `](@ref) this will return `nothing`.
12521252"""
12531253function getstatus (pid:: Int = myid ())
12541254 if pid ∉ procs ()
0 commit comments