pinchpi_worker (pinchpi v0.1.0)

Summary

Types

state/0

-type state() ::
          #state{code :: binary(),
                 opts :: map(),
                 status :: running | {done, term()},
                 waiters :: [gen_server:from()]}.

Functions

await(Pid, Timeout)

-spec await(pid(), timeout()) -> term().

handle_call(Req, From, State)

-spec handle_call(term(), gen_server:from(), state()) -> {reply, term(), state()} | {noreply, state()}.

handle_cast(Msg, State)

-spec handle_cast(term(), state()) -> {noreply, state()}.

handle_info(Info, State)

-spec handle_info(term(), state()) -> {noreply, state()}.

init(_)

-spec init([binary() | map()]) -> {ok, state()}.

start_link(Code, Opts)

-spec start_link(binary(), map()) -> {ok, pid()} | {error, term()}.

terminate(Reason, State)

-spec terminate(term(), state()) -> ok.