ThreadCallbackProc alias
Called on each scheduler thread when it starts and when it exits.
- Use
#include <ThinkMeta.ConcurrentTasks/Core.h>- Namespace
ThinkMeta::ConcurrentTasks
Syntax
using ThreadCallbackProc =
void (*)(
ITaskScheduler* taskScheduler,
DWORD threadIndex,
HANDLE thread,
void* context,
ThreadCallbackReason reason
) noexcept;Parameters
taskSchedulerITaskScheduler*- The scheduler the thread belongs to.
threadIndexDWORD- 0-based index of the thread within its scheduler.
threadHANDLE- The scheduler thread's handle (full access). Owned by the scheduler and valid until it is destroyed; duplicate it to keep it longer.
contextvoid*SchedulerInfo::threadCallbackContext.reasonThreadCallbackReason- See
ThreadCallbackReason.
Remarks
Use it e.g. to set thread affinity, priority or thread-local state. Runs on the plain OS thread, not in a task: it must not use the synchronization primitives or the task functions. Only the SchedulerKind::Default scheduler calls it.
See also
Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).