Module wpool_fsm_process

Decorator over gen_fsm that lets wpool_pool control certain aspects of the execution.

Behaviours: gen_fsm.

Authors: Felipe Ripoll (ferigis@gmail.com).

Description

Decorator over gen_fsm that lets wpool_pool control certain aspects of the execution

Data Types

from()

from() = {pid(), reference()}

fsm_state()

fsm_state() = atom()

state()

state() = #state{name = atom(), mod = atom(), state = term(), options = [{time_checker | queue_manager, atom()} | wpool:option()], fsm_state = fsm_state()}

Function Index

cast_call/3Equivalent to gen_fsm:send_event(Process, {sync_send_event, From, Event}).
cast_call_all/3Equivalent to gen_fsm:send_all_state_event(Process, {sync_send_event, From, Event}).
dispatch_state/2
dispatch_state/3
format_status/2
handle_event/3
handle_sync_event/4
send_all_state_event/2
send_event/2
start_link/4Starts a named process.
sync_send_all_state_event/2
sync_send_all_state_event/3
sync_send_event/2
sync_send_event/3

Function Details

cast_call/3

cast_call(Process::wpool:name() | pid(), From::from(), Event::term()) -> ok

Equivalent to gen_fsm:send_event(Process, {sync_send_event, From, Event}).

cast_call_all/3

cast_call_all(Process::wpool:name() | pid(), From::from(), Event::term()) -> ok

Equivalent to gen_fsm:send_all_state_event(Process, {sync_send_event, From, Event}).

dispatch_state/2

dispatch_state(Event::term(), StateData::state()) -> {next_state, dispatch_state, state()} | {stop, term(), state()}

dispatch_state/3

dispatch_state(Event::term(), From::from(), StateData::state()) -> {next_state, dispatch_state, state()} | {next_state, dispatch_state, state(), timeout()} | {reply, term(), dispatch_state, state()} | {reply, term(), dispatch_state, state(), timeout()} | {stop, term(), term(), state()} | {stop, term(), state()}

format_status/2

format_status(Opt::normal | terminate, X2::list()) -> term()

handle_event/3

handle_event(Event::term(), StateName::fsm_state(), StateData::state()) -> {next_state, dispatch_state, state()} | {next_state, dispatch_state, state(), timeout()} | {stop, term(), state()}

handle_sync_event/4

handle_sync_event(Event::term(), From::from(), StateName::fsm_state(), StateData::state()) -> {reply, term(), dispatch_state, state()} | {reply, term(), dispatch_state, state(), timeout()} | {next_state, dispatch_state, state()} | {next_state, dispatch_state, state(), timeout()} | {stop, term(), term(), state()} | {stop, term(), state()}

send_all_state_event/2

send_all_state_event(Process::wpool:name() | pid(), Event::term()) -> term()

send_event/2

send_event(Process::wpool:name() | pid(), Event::term()) -> term()

start_link/4

start_link(Name::wpool:name(), Module::module(), InitArgs::term(), Options::[wpool:option()]) -> {ok, pid()} | ignore | {error, {already_started, pid()} | term()}

Starts a named process

sync_send_all_state_event/2

sync_send_all_state_event(Process::wpool:name() | pid(), Event::term()) -> term()

sync_send_all_state_event/3

sync_send_all_state_event(Process::wpool:name() | pid(), Event::term(), Timeout::timeout()) -> term()

sync_send_event/2

sync_send_event(Process::wpool:name() | pid(), Event::term()) -> term()

sync_send_event/3

sync_send_event(Process::wpool:name() | pid(), Event::term(), Timeout::timeout()) -> term()


Generated by EDoc, Apr 3 2017, 11:16:15.