Share via


CurrentScheduler::RegisterShutdownEvent Method

Causes the Windows event handle passed in the _ShutdownEvent parameter to be signaled when the scheduler associated with the current context shuts down and destroys itself. At the time the event is signaled, all work that had been scheduled to the scheduler is complete. Multiple shutdown events can be registered through this method.

static void __cdecl RegisterShutdownEvent(
   HANDLE _ShutdownEvent
);

Parameters

  • _ShutdownEvent
    A handle to a Windows event object which will be signaled by the runtime when the scheduler associated with the current context shuts down and destroys itself.

Remarks

If there is no scheduler attached to the calling context, calling this method will result in a scheduler_not_attached exception being thrown.

Requirements

Header: concrt.h

Namespace: concurrency

See Also

Reference

CurrentScheduler Class