CurrentScheduler::ScheduleTask Method

Schedules a light-weight task within the scheduler associated with the calling context. The light-weight task will be placed in a schedule group of the runtime's choosing.

_CRTIMP static void __cdecl ScheduleTask(
   TaskProc _Proc,
   void * _Data


A pointer to the function to execute to perform the body of the light-weight task.


A void pointer to the data that will be passed as a parameter to the body of the task.

This method will result in the process' default scheduler being created and/or attached to the calling context if there is no scheduler currently associated with the calling context.

Header: concrt.h

Namespace: Concurrency

Community Additions