Skip to content

Commit

Permalink
@schedule is deprecated, the code is no longer valid in 1.0 (#28800)
Browse files Browse the repository at this point in the history
* @schedule is deprecated, the code is no longer valid in 1.0

* Additional changes for 1.0 compliance
  • Loading branch information
iht authored and staticfloat committed Aug 24, 2018
1 parent 5f7aa5c commit 484b5ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/src/manual/parallel-computing.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ A channel can be visualized as a pipe, i.e., it has a write end and a read end :

# we can schedule `n` instances of `foo` to be active concurrently.
for _ in 1:n
@schedule foo()
@async foo()
end
```
* Channels are created via the `Channel{T}(sz)` constructor. The channel will only hold objects
Expand Down Expand Up @@ -184,16 +184,16 @@ julia> function make_jobs(n)
julia> n = 12;
julia> @schedule make_jobs(n); # feed the jobs channel with "n" jobs
julia> @async make_jobs(n); # feed the jobs channel with "n" jobs
julia> for i in 1:4 # start 4 tasks to process requests in parallel
@schedule do_work()
@async do_work()
end
julia> @elapsed while n > 0 # print out results
job_id, exec_time = take!(results)
println("$job_id finished in $(round(exec_time,2)) seconds")
n = n - 1
println("$job_id finished in $(round(exec_time; digits=2)) seconds")
global n = n - 1
end
4 finished in 0.22 seconds
3 finished in 0.45 seconds
Expand Down

0 comments on commit 484b5ca

Please sign in to comment.