@@ -1014,7 +1014,7 @@ not specified.
1014
1014
1015
1015
The callback will be called with the worker ID, the final
1016
1016
`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
1018
1018
enum, a value of `WorkerState_terminated` means a graceful exit and a value of
1019
1019
`WorkerState_exterminated` means the worker died unexpectedly.
1020
1020
@@ -1210,7 +1210,7 @@ Identical to [`workers()`](@ref) except that the current worker is filtered out.
1210
1210
other_workers () = filter (!= (myid ()), workers ())
1211
1211
1212
1212
"""
1213
- setstatus(x, pid::Int=myid())
1213
+ setstatus! (x, pid::Int=myid())
1214
1214
1215
1215
Set the status for worker `pid` to `x`. `x` may be any serializable object but
1216
1216
it'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.
1223
1223
1224
1224
# Examples
1225
1225
```julia-repl
1226
- julia> DistributedNext.setstatus("working on dataset 42")
1226
+ julia> DistributedNext.setstatus! ("working on dataset 42")
1227
1227
"working on dataset 42"
1228
1228
1229
1229
julia> DistributedNext.getstatus()
1230
1230
"working on dataset 42"
1231
1231
```
1232
1232
"""
1233
- function setstatus (x, pid:: Int = myid ())
1233
+ function setstatus! (x, pid:: Int = myid ())
1234
1234
if pid ∉ procs ()
1235
1235
throw (ArgumentError (" Worker $(pid) does not exist, cannot set its status" ))
1236
1236
end
1237
1237
1238
1238
if myid () == 1
1239
1239
@lock map_pid_statuses_lock map_pid_statuses[pid] = x
1240
1240
else
1241
- remotecall_fetch (setstatus, 1 , x, myid ())
1241
+ remotecall_fetch (setstatus! , 1 , x, myid ())
1242
1242
end
1243
1243
end
1244
1244
@@ -1248,7 +1248,7 @@ _getstatus(pid) = @lock map_pid_statuses_lock get!(map_pid_statuses, pid, nothin
1248
1248
getstatus(pid::Int=myid())
1249
1249
1250
1250
Get 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`.
1252
1252
"""
1253
1253
function getstatus (pid:: Int = myid ())
1254
1254
if pid ∉ procs ()
0 commit comments