Share via


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 call to the Context::Block method or a synchronization object which was built using the runtime's Context::Block method. On the UMS scheduler, this could also indicate a call to a Windows method which explicitly blocked using Windows synchronization primitives. Page faults, thread suspensions, and other asynchronous events which the UMS scheduler is aware of do not constitute synchronous blocking.

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