Extra v0.2.0 Process.Extra

Extensions to the standard library’s Process module.

Link to this section Summary

Functions

Exits the specified pid_or_atom with the provided :reason

Returns a stream of nearest neighbors closest to the pid via traversal

Link to this section Functions

Link to this function exit(atom, reason)
exit(atom | pid, reason :: term) :: true

Exits the specified pid_or_atom with the provided :reason.

This function is similar to Process.kill/2 with the following differences:

It accepts an atom, in which case it will attempt to resolve the module via Process.whereis/1, and if it is unable to resolve it will function as a no-op.

Link to this function nearest(pid, opts \\ [])
nearest(pid, keyword) :: Enum.t

Returns a stream of nearest neighbors closest to the pid via traversal.

Which process relationships to traverse is defined by the options below.

Options

  • :links - boolean - whether to include linked processes. Default: true.
  • :monitors - boolean - whether to include monitored processes. Default: true.