Skip to content

Commit 6db7f1f

Browse files
revert doc examples to @async
I believe these make more sense as async than spawn, otherwise more orchestration is needed in the example. Were changed to spawn in JuliaLang#55315
1 parent 50a8cce commit 6db7f1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/src/manual/methods.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ Start some other operations that use `f(x)`:
614614
julia> g(x) = f(x)
615615
g (generic function with 1 method)
616616
617-
julia> t = Threads.@spawn f(wait()); yield();
617+
julia> t = @async f(wait()); yield();
618618
```
619619

620620
Now we add some new methods to `f(x)`:
@@ -639,7 +639,7 @@ julia> g(1)
639639
julia> fetch(schedule(t, 1))
640640
"original definition"
641641
642-
julia> t = Threads.@spawn f(wait()); yield();
642+
julia> t = @async f(wait()); yield();
643643
644644
julia> fetch(schedule(t, 1))
645645
"definition for Int"

0 commit comments

Comments
 (0)