You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same @sync blocks below, run twice results in different outputs
in the first run, variable t is bound to the value when it is printed
in the second run, variable t is bound to the value when the block is entered
_/ |\__'_|_|_|\__'_| | Commit 563ba1c84 2013-07-14 04:02:55*
|__/ | x86_64-linux-gnu
julia> @sync begin
t = false
@async begin
sleep(1.0)
print("1: ", t, "\n")
end
t = true
end
1: true
true
julia> @sync begin
t = false
@async begin
sleep(1.0)
print("1: ", t, "\n")
end
t = true
end
1: false
true
julia>
The text was updated successfully, but these errors were encountered:
The same
@sync
blocks below, run twice results in different outputst
is bound to the value when it is printedt
is bound to the value when the block is enteredThe text was updated successfully, but these errors were encountered: