次の方法で共有


Scheduler::Reference Method

Increments the scheduler reference count.

virtual unsigned int Reference() =0 ;

Return Value

The newly incremented reference count.

Remarks

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.

Requirements

Header: concrt.h

Namespace: concurrency

See Also

Reference

Scheduler Class

Scheduler::Release Method

Scheduler::Create Method