View Source sidejob_supervisor (sidejob v2.2.0)

This module implements a sidejob_worker behavior that operates as a parallel, capacity-limited supervisor of dynamic, transient children.

Summary

Types

-type resource() :: atom().

Functions

Link to this function

code_change(OldVsn, State, Extra)

View Source
Link to this function

handle_call(Request, From, State)

View Source
Link to this function

handle_info(Info, State)

View Source
-spec spawn(resource(), function() | {module(), atom(), [term()]}) -> {ok, pid()} | {error, overload}.
Link to this function

spawn(Name, Mod, Fun, Args)

View Source
-spec spawn(resource(), module(), atom(), [term()]) -> {ok, pid()} | {error, overload}.
Link to this function

start_child(Name, Mod, Fun, Args)

View Source
-spec start_child(resource(), module(), atom(), term()) ->
               {ok, pid()} |
               {ok, pid(), term()} |
               {ok, undefined} |
               {error, overload} |
               {error, term()}.
Link to this function

terminate(Reason, State)

View Source
-spec which_children(resource()) -> [pid()].