Box.PoolProcessor.QueueBehaviour behaviour (box v0.15.1)

View Source

Summary

Types

state()

@type state() :: any()

watcher()

@type watcher() :: pid()

Callbacks

dequeue(state)

@callback dequeue(state()) ::
  :empty | {Box.PoolProcessor.execute_function(), [watcher()], state()}

enqueue(state, execute_function, list)

@callback enqueue(state(), Box.PoolProcessor.execute_function(), [watcher()]) :: state()

init(t)

@callback init(Keyword.t()) :: {:ok, state()} | {:load, state()}

load(state, t)

@callback load(state(), Keyword.t()) :: state()

Functions

dequeue(arg, state)

enqueue(arg, state, mfa, watchers)

init(arg)

load(arg, state)