Export (0) Print
Expand All

Scheduler::Reference Method

Increments the scheduler reference count.

virtual unsigned int Reference() =0 ;

The newly incremented reference count.

This is typically used to manage the lifetime of the scheduler for composition. When the reference count of a scheduler falls to zero, the scheduler will shut down and destruct itself after all work on the scheduler has completed.

The method will throw an improper_scheduler_reference exception if the reference count prior to calling the Reference method was zero and the call is made from a context that is not owned by the scheduler.

Header: concrt.h

Namespace: concurrency

Show:
© 2014 Microsoft