Skip to main content

Example

You might want to explicitly control the threads that are used for task queue work and completions. In these cases, create a manual task queue and dispatch the calls yourself. If you’re using manual task queues, you must ensure that they also pump the Windows message queue. The following example shows how to create a manually pumped task queue. It creates two STL threads that dispatch calls for both the work port and the completion port.

See also

Designing the task queue
Last modified on August 4, 2026