Skip to content

Commit 47cd776

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 #55315
1 parent a895fa8 commit 47cd776

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
@@ -615,7 +615,7 @@ Start some other operations that use `f(x)`:
615615
julia> g(x) = f(x)
616616
g (generic function with 1 method)
617617
618-
julia> t = Threads.@spawn f(wait()); yield();
618+
julia> t = @async f(wait()); yield();
619619
```
620620

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

0 commit comments

Comments
 (0)