View Source ProcessHub.Worker.WorkerQueue (ProcessHub v0.8.0)
Summary
Functions
Returns a specification to start this module under a supervisor.
Queues fun behind the work already queued, without waiting for it.
Runs fun on the worker queue once the work already queued is done. Called
from the queue itself, it runs right away. Waiting longer than timeout
exits the caller; fun stays queued and still runs.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec run_async(GenServer.server(), (-> term())) :: :ok
Queues fun behind the work already queued, without waiting for it.
@spec run_on(GenServer.server(), (-> result), timeout()) :: result when result: term()
Runs fun on the worker queue once the work already queued is done. Called
from the queue itself, it runs right away. Waiting longer than timeout
exits the caller; fun stays queued and still runs.