Skip to content

Commit 24a1fd9

Browse files
un-doctest examples that aren't guaranteed threaded output order
1 parent 495d9f8 commit 24a1fd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/src/manual/faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ While the streaming I/O API is synchronous, the underlying implementation is ful
941941

942942
Consider the printed output from the following:
943943

944-
```jldoctest
944+
```
945945
julia> @sync for i in 1:3
946946
Threads.@spawn write(stdout, string(i), " Foo ", " Bar ")
947947
end
@@ -954,7 +954,7 @@ yields to other tasks while waiting for that part of the I/O to complete.
954954
`print` and `println` "lock" the stream during a call. Consequently changing `write` to `println`
955955
in the above example results in:
956956

957-
```jldoctest
957+
```
958958
julia> @sync for i in 1:3
959959
Threads.@spawn println(stdout, string(i), " Foo ", " Bar ")
960960
end
@@ -965,7 +965,7 @@ julia> @sync for i in 1:3
965965

966966
You can lock your writes with a `ReentrantLock` like this:
967967

968-
```jldoctest
968+
```
969969
julia> l = ReentrantLock();
970970
971971
julia> @sync for i in 1:3

0 commit comments

Comments
 (0)