What is SynchronizationContext.IsWaitNotificationRequired for?

SynchronizationContext has the IsWaitNotificationRequired property. For his purpose, docs can say the following:

Determines whether to wait for a notification.

true if pending notification is required; otherwise false.

Gosh, this clarifies the situation.

What exactly is this β€œwaiting alert”, and when / why is it required / not required? Is IsWaitNotificationRequired something in the Control.InvokeRequired lines, or is it something else?

+7
source share
1 answer

This is for an infrastructure that allows you to connect to the CLR synchronization wait procedure. This blog explains how this works: http://www.bluebytesoftware.com/blog/PermaLink,guid,710e6ba3-60e9-4f5e-a5a7-d878015c7a16.aspx

This property will always return false if this behavior has not been specifically overridden in a subclass of SynchronizationContext , and if it calls your overridden implementation of the Wait method.

+1
source

All Articles