Created
January 29, 2009 01:03
-
-
Save lawrencepit/54297 to your computer and use it in GitHub Desktop.
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
loop1() -> | |
receive | |
Other -> | |
io:format("Received ~p~n", [Other]), | |
loop1() | |
end. | |
loop2() -> receive Other -> io:format("Received ~p~n", [Other]), loop2() end. | |
test() -> | |
Pid1 = spawn(fun loop1/0), | |
Pid2 = spawn(fun loop2/0), | |
Pid3 = spawn(fun() -> receive Other -> io:format("Received ~p~n", [Other]) end), | |
ok. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment