Packages > @fluidframework/container-definitions > IDeltaQueueEvents
IDeltaQueueEvents Interface
Events emitted by IDeltaQueue .
Signature
/** @sealed */
export interface IDeltaQueueEvents<T> extends IErrorEvent
Extends: IErrorEvent
Type Parameters
Parameter | Description |
---|---|
T |
Call Signatures
CallSignature | Description |
---|---|
(event: "push", listener: (task: T) => void): any | Emitted when a task is enqueued. |
(event: "op", listener: (task: T) => void): any | Emitted immediately after processing an enqueued task and removing it from the queue. |
(event: "idle", listener: (count: number, duration: number) => void): any | Emitted when the queue of tasks to process is emptied. |
Call Signature Details
(event: “push”, listener: (task: T) => void): any
Emitted when a task is enqueued.
Signature
(event: "push", listener: (task: T) => void): any;
Remarks
Listener parameters:
task
: The task being enqueued.
(event: “op”, listener: (task: T) => void): any
Emitted immediately after processing an enqueued task and removing it from the queue.
Signature
(event: "op", listener: (task: T) => void): any;
Remarks
Note: this event is not intended for general use. Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the ops directly on the IDeltaQueue .
Listener parameters:
task
: The task that was processed.
(event: “idle”, listener: (count: number, duration: number) => void): any
Emitted when the queue of tasks to process is emptied.
Signature
(event: "idle", listener: (count: number, duration: number) => void): any;
Remarks
Listener parameters:
-
count
: The number of events (T
) processed before becoming idle. -
duration
: The amount of time it took to process elements (in milliseconds).