Udostępnij za pośrednictwem


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
);

Parameters

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

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

Remarks

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.

Requirements

Header: concrt.h

Namespace: Concurrency

See Also

Reference

CurrentScheduler Class

ScheduleGroup Class

Concepts

Task Scheduler (Concurrency Runtime)