Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 467 Bytes

usage-manual.md

File metadata and controls

19 lines (15 loc) · 467 Bytes

Manual Usage

The ChaosSpawn module provides the following function that can be used to register any pid. This pid is then eligible to be terminated randomly.

ChaosSpawn.register_pid( pid )

For example adding this to a simple gen server's init would look like:

def init(:ok) do
  ChaosSpawn.register_pid(self)
  {:ok, []}
end

This gen server will then register itself everytime it is started as a process that can be killed.