Skip to content

Commit

Permalink
Update cluster.jl
Browse files Browse the repository at this point in the history
To make the highlighting style consistent.
  • Loading branch information
likanzhan authored Jul 13, 2020
1 parent e24e2f0 commit 9699c8b
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 9699c8b

Please sign in to comment.