Created
February 21, 2015 19:25
-
-
Save zenna/2d15fba9befb0784c764 to your computer and use it in GitHub Desktop.
RemoteRef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rr2 = RemoteRef(2) | |
put!(rr2,"test2") | |
rr3 = RemoteRef(3) | |
put!(rr3,"test3") | |
a = "hello" | |
function rand2() | |
return 2*rand(3) | |
end | |
g2 = @spawnat 2 print(a); print(take!(rr2)) | |
g2 = @spawnat 2 print(rand2()); print(take!(rr3)) # This causes error | |
g3 = @spawnat 3 print(take!(rr3)) | |
fetch(g2) | |
fetch(g3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment