다음을 통해 공유


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 determined by the runtime. The version that takes the parameter _Placement causes the task to be biased towards executing at the specified location.

static void __cdecl ScheduleTask(
   TaskProc _Proc,
   _Inout_opt_ void * _Data
);

static void __cdecl ScheduleTask(
   TaskProc _Proc,
   _Inout_opt_ void * _Data,
   location& _Placement
);

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.

  • _Placement
    A reference to a location where the light-weight task will be biased towards executing at.

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

location Class

Concepts

Task Scheduler (Concurrency Runtime)