Expand|Select|Wrap|Line Numbers
- public static bool Wait(
- Object obj,
- TimeSpan timeout,
- bool exitContext
- )
I'm not sure if I missed anything. But my deduction is:
If exitContext is false, which means not to exit the synchronization domain -> the thread which calls wait will still hold the lock for the domain -> other thread will not be able to access objects in the domain -> other thread can not access the object and lock it in order to call pulse -> the original wait method will always be time out.
This is just too dumb...There must be something wrong about it. What happends behind the scene when you release the lock on an object in a domain and at the same time "not exit the domain"? Isn't there just one lock for all objects in the domain?
Thanks for help in advance!