Skip to content

Commit

Permalink
Merge pull request #36636 from likanzhan/patch-1
Browse files Browse the repository at this point in the history
Update cluster.jl
  • Loading branch information
vchuravy authored Jul 13, 2020
2 parents b0a55b8 + 9699c8b commit 967ac6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stdlib/Distributed/src/cluster.jl
Original file line number Diff line number Diff line change
Expand Up @@ -411,19 +411,19 @@ if launching workers programmatically, execute `addprocs` in its own task.
# Examples
```
```julia
# On busy clusters, call `addprocs` asynchronously
t = @async addprocs(...)
```
```
```julia
# Utilize workers as and when they come online
if nprocs() > 1 # Ensure at least one new worker is available
.... # perform distributed execution
end
```
```
```julia
# Retrieve newly launched worker IDs, or any error messages
if istaskdone(t) # Check if `addprocs` has completed to ensure `fetch` doesn't block
if nworkers() == N
Expand Down

0 comments on commit 967ac6f

Please sign in to comment.