SchedulerInfo struct
Parameters of CreateTaskScheduler.
- Use
#include <ThinkMeta.ConcurrentTasks/Core.h>- Namespace
ThinkMeta::ConcurrentTasks
Syntax
struct SchedulerInfoRemarks
The core copies the struct.
Fields
version
ABI version the caller was built with.
Syntax
unsigned long version = SchedulerVersion;Remarks
Leave it at SchedulerVersion. CreateTaskScheduler rejects any other version.
numberOfThreads
Scheduler threads to run; 0 means one per logical processor.
Syntax
DWORD numberOfThreads = 0;threadCallback
Called on every scheduler thread when it starts and when it exits.
Syntax
ThreadCallbackProc threadCallback = nullptr;See also
threadCallbackContext
Passed unchanged to threadCallback.
Syntax
void* threadCallbackContext = nullptr;Remarks
Must outlive the scheduler's threads.
taskSwitchPolicy
Switch policy of a SchedulerKind::TaskSwap scheduler.
Syntax
ITaskSwitchPolicy* taskSwitchPolicy = nullptr;Remarks
Required for TaskSwap, ignored otherwise.
See also
taskQueueCapacity
Capacity of each of the Default scheduler's four task queues.
Syntax
unsigned long taskQueueCapacity = 0;Remarks
It bounds the tasks that can be runnable at the same time per queue - new tasks per priority, and resumed or yielded tasks per priority - so choose it larger than the most tasks the application can have runnable at once; filling a queue is invalid use. Suspended tasks do not count. Rounded up to the next power of two; 0 means DefaultTaskQueueCapacity; above MaximumTaskQueueCapacity CreateTaskScheduler fails. Each slot takes one cache line. Ignored by SchedulerKind::TaskSwap.
Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).