共用方式為


Context::IsSynchronouslyBlocked Method

Determines whether or not the context is synchronously blocked. A context is considered to be synchronously blocked if it explicitly performed an action which led to blocking.

virtual bool IsSynchronouslyBlocked() const =0;

Return Value

Whether the context is synchronously blocked.

Remarks

A context is considered to be synchronously blocked if it explicitly performed an action which led to blocking. On the thread scheduler, this would indicate a direct call to the Context::Block method or a synchronization object which was built using the Context::Block method.

The return value from this method is an instantaneous sample of whether the context is synchronously blocked. This value may be stale the moment it is returned and can only be used under very specific circumstances.

Requirements

Header: concrt.h

Namespace: concurrency

See Also

Reference

Context Class

Context::Block Method