messages/0 | Equivalent to process_messages(self()). |
messages/1 |
Returns all queued messages for the process Pid . |
r_messages/1 |
Returns all queued messages for the process Pid , but doesn't
matter if process is local or remote. |
spawn_callback_handler/3 | Equivalent to spawn_callback_handler(Module, Fun, Args, []). |
spawn_callback_handler/4 |
Spawns a process that stays receiving messages, and when a message
is received, it applies the given callback {Mod, Fun, Args} . |
spawn_handler/1 | Equivalent to spawn_handler(Fun, []). |
spawn_handler/2 | Equivalent to spawn_handler(Fun, Args, []). |
spawn_handler/3 |
Same as spawn_callback_handler/4 , but receives a fun as
callback. |
spawn_timer_fun/1 |
Spawns a linked process that sleeps for the given Timeout , once
timeout expires then process dies. |
wait_for_msg/0 | Equivalent to wait_for_msg(infinity). |
wait_for_msg/1 | . |
messages() -> any()
Equivalent to process_messages(self()).
messages(Pid::pid()) -> [term()]
Returns all queued messages for the process Pid
.
r_messages(Pid::pid()) -> [term()]
Returns all queued messages for the process Pid
, but doesn't
matter if process is local or remote.
spawn_callback_handler(Module, Fun, Args) -> any()
Equivalent to spawn_callback_handler(Module, Fun, Args, []).
spawn_callback_handler(Module::module(), Fun::atom(), Args::[term()], Opts::[term()]) -> pid() | {pid(), reference()}
Spawns a process that stays receiving messages, and when a message
is received, it applies the given callback {Mod, Fun, Args}
.
Opts
: Spawn process options. See erlang:spawn_opt/2
.See also: erlang:spawn_opt/2.
spawn_handler(Fun) -> any()
Equivalent to spawn_handler(Fun, []).
spawn_handler(Fun, Args) -> any()
Equivalent to spawn_handler(Fun, Args, []).
spawn_handler(Fun, Args, Opts) -> any()
Equivalent to spawn_callback_handler(erlang, apply, [Fun, Args], Opts).
Same as spawn_callback_handler/4
, but receives a fun
as
callback. This fun
is invoked as:
apply(erlang, apply, [Fun, [Message | Args]])Where
Message
is inserted as 1st argument in the fun
args.
spawn_timer_fun(Timeout::timeout()) -> pid()
Spawns a linked process that sleeps for the given Timeout
, once
timeout expires then process dies.
wait_for_msg() -> any()
Equivalent to wait_for_msg(infinity).
wait_for_msg(Timeout::timeout()) -> term() | {error, timeout}
Generated by EDoc