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.
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.
If there is no scheduler attached to the calling context, calling this method will result in a scheduler_not_attached exception being thrown.