Skip to content

Instantly share code, notes, and snippets.

@r00takaspin
Created April 26, 2017 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r00takaspin/0b6ce6f0ddcf183900767f654b6e9a16 to your computer and use it in GitHub Desktop.
Save r00takaspin/0b6ce6f0ddcf183900767f654b6e9a16 to your computer and use it in GitHub Desktop.
some_function(From) -> From ! { reply, "Greetings" } end.
P = spawn(some_function(self())),
receive
  {reply, Msg} -> Msg,
  Msg -> io:format("~p~n", [Msg])
after 5000 -> timeout
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment