Module s2_procs

Processes.

Description

Processes.

Data Types

'maybe'()

'maybe'(A, B) = {ok, A} | {error, B}

proc()

proc() = pid() | atom() | {atom(), node()}

whynot()

whynot(B) = ok | {error, B}

Function Index

flush/0flush() causes the calling process's message queue to be emptied.
flush/1flush() causes the calling process's message queue to be emptied of Msgs.
is_up/1is_up(Proc) is true iff Proc is running.
kill/1kill(Procs) causes Procs to be terminated.
kill/2
pid/1pid(Proc) is Proc's pid.
recv/1recv(Proc) is the next message received from Proc.
recv/2
send/2send(Proc, Msg) causes Msg to be sent to Proc.
spinlock/1Spin until F returns true.
with_monitor/2with_monitor(Proc, F) causes F to be called while Proc is being monitored.

Function Details

flush/0

flush() -> ok

flush() causes the calling process's message queue to be emptied.

flush/1

flush(Msg::term()) -> ok

flush() causes the calling process's message queue to be emptied of Msgs.

is_up/1

is_up(Proc::proc()) -> boolean()

is_up(Proc) is true iff Proc is running.

kill/1

kill(Proc::[proc()]) -> boolean()

kill(Procs) causes Procs to be terminated.

kill/2

kill(Proc, Opts) -> any()

pid/1

pid(Pid::proc()) -> pid() | undefined

pid(Proc) is Proc's pid.

recv/1

recv(Proc::proc()) -> 'maybe'(term(), term())

recv(Proc) is the next message received from Proc.

recv/2

recv(Proc, Timeout) -> any()

send/2

send(Proc::proc(), Msg0::term()) -> whynot(no_such_process)

send(Proc, Msg) causes Msg to be sent to Proc.

spinlock/1

spinlock(F::fun(() -> boolean())) -> true | no_return()

Spin until F returns true.

with_monitor/2

with_monitor(Proc::proc(), F::fun(({proc(), reference()}) -> A)) -> A

with_monitor(Proc, F) causes F to be called while Proc is being monitored.


Generated by EDoc