MSDN documentation suggests that there may be other ways of using ExitContext flag. See WaitHandle.WaitOne() What other ways are there to enter a non-default context outside of using a ContextBoundObject inherited class? (I can't use ContextBoundObject in my application)
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
The clue is in this sentence.
So basically you could call
WaitOne
from within a class that does not subclassContextBoundObject
nor would you have any preconceived notion that aContextBoundObject
was in any way involved with your code and yet the thread in question could be in a nondefault context because somewhere way up in the call stack an instance method of aContextBoundObject
class could be running unbeknown to you.Outside of that lone exception there are no other ways of entering into a nondefault synchronization context.
There is a pretty good article on threading with additional information related to synchronization contexts which can be found here.