File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -941,7 +941,7 @@ While the streaming I/O API is synchronous, the underlying implementation is ful
941941
942942Consider the printed output from the following:
943943
944- ``` jldoctest
944+ ```
945945julia> @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 `
955955in the above example results in:
956956
957- ``` jldoctest
957+ ```
958958julia> @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
966966You can lock your writes with a ` ReentrantLock ` like this:
967967
968- ``` jldoctest
968+ ```
969969julia> l = ReentrantLock();
970970
971971julia> @sync for i in 1:3
You can’t perform that action at this time.
0 commit comments