do receive do {:bear, from} -> number = number + 0 send from, {self(), number} loop number _ -> loop number end end end momonga = spawn Momonga, :start, [] send momonga, {:bear, self()} IO.inspect receive do: ({^momonga, number} -> number)
* Registry Elixir has some good restriction. * Immutable data * Sending messages canʼt fail * No shared state (Thereʼs some exception) * Process doesn't block other processes (Thereʼs some exception) But testing parallel fault is too-oo-oo hard for human.