Skip to content

Instantly share code, notes, and snippets.

View ahmadferdous's full-sized avatar

Ahmad Ferdous ahmadferdous

View GitHub Profile
@ahmadferdous
ahmadferdous / example_trap_exit.exs
Created August 28, 2017 20:19
Elixir example of trapping exit
defmodule A do
def start_link do
GenServer.start_link(__MODULE__, :ok, name: :A)
end
def fun(fun_loving_person) do
GenServer.call(fun_loving_person, :have_fun)
end
def init(:ok) do