Skip to content

Instantly share code, notes, and snippets.

@miguelarauj1o
Forked from marcelog/mymodule.erl
Created December 14, 2016 03:38
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 miguelarauj1o/23e1b0bb03022651070e02506d571125 to your computer and use it in GitHub Desktop.
Save miguelarauj1o/23e1b0bb03022651070e02506d571125 to your computer and use it in GitHub Desktop.
-module(mymodule).
start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
...
crash() ->
gen_server:cast(?MODULE, crash).
...
handle_cast(crash,State) ->
{stop, error, State};
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment