View Source ebus_proc (ebus v0.3.0)
Link to this section Summary
Functions
Equivalent to messages(self()).
Pid.Pid, regardless if process is local or remote.Equivalent to spawn_callback_handler(Module, Fun, Args, []).
Spawns a process that stays receiving messages, and when a message is received, it applies the given callback {Mod, Fun, Args}.
Equivalent to spawn_handler(Fun, []).
Equivalent to spawn_handler(Fun, Args, []).
Equivalent to spawn_callback_handler(erlang, apply, [Fun, Args], Opts).
Timeout, once timeout expires then process dies.Equivalent to wait_for_msg(infinity).
Timeout for a message.Link to this section Functions
Equivalent to messages(self()).
-spec messages(pid()) -> [term()].
Pid.
-spec r_messages(pid()) -> [term()].
Pid, regardless if process is local or remote.
Equivalent to spawn_callback_handler(Module, Fun, Args, []).
-spec spawn_callback_handler(module(), atom(), [term()], [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. Seeerlang:spawn_opt/2.
See also: erlang:spawn_opt/2.
Equivalent to spawn_handler(Fun, []).
Equivalent to spawn_handler(Fun, Args, []).
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.
-spec spawn_timer_fun(timeout()) -> pid().
Timeout, once timeout expires then process dies.
Equivalent to wait_for_msg(infinity).
-spec wait_for_msg(timeout()) -> term() | {error, timeout}.
Timeout for a message.