SynchronizationContext has a property called IsWaitNotificationRequired. Of its purpose, the docs have this to say:
Determines if wait notification is required.
true if wait notification is required; otherwise, false.
Gosh, that clarifies things.
What exactly is this "wait notification", and when / why would it be required / not required? Is IsWaitNotificationRequired something along the lines of Control.InvokeRequired, or is this something different?
This is for infrastructure that allows hooking up into CLR synchronisation wait routine. This blog post explains how this works: https://web.archive.org/web/20080503180352/http://www.bluebytesoftware.com/blog/2008/02/27/HookingCLRBlockingCallsWithSynchronizationContext.aspx
This property will always return false if this behaviour has not been specifically overridden in a subclass of SynchronizationContext and if it does your overridden implementation of the Wait method gets called.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With