Dust.CallbackWorker (dustlayer v0.1.1)

Copy Markdown View Source

Per-subscription worker process that receives events and calls the callback.

Each subscription gets its own worker with a bounded mailbox. The SyncEngine checks Process.info(pid, :message_queue_len) before dispatching; if the queue exceeds max_queue_size, the subscription is dropped and the on_resync callback fires with %{error: :resync_required}.

Summary

Functions

Returns a specification to start this module under a supervisor.

Send an event to the worker. Called by the SyncEngine dispatcher.

Return the current message queue length of the worker process.

Start a worker without linking to the caller.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

dispatch(pid, event)

Send an event to the worker. Called by the SyncEngine dispatcher.

queue_len(pid)

Return the current message queue length of the worker process.

start(opts)

Start a worker without linking to the caller.

start_link(opts)