Skip to main content

Example

The following example shows how to submit a callback to either the work port or the completion port of a task queue. First, it submits a work callback. Then, at the end of the work callback, it submits a completion callback. This is typical usage. The SubmitCallbacks function is used in subsequent scenarios for brevity.

See also

Designing the task queue
Last modified on August 4, 2026