I worked on java.lang.Thread and ran into two issues. In .NET it is not possible to:
- obtain the interrupted status of a thread (other than the current thread)
- test for Monitor ownership
I worked around the interrupted status issue by always returning false when you query a thread other than the current thread :-( and to test for Monitor ownership I do a Monitor.Wait on the object, with a timeout of 0. That works, but it isn't safe, because Wait temporarily releases the Monitor (if we do own it), and that could cause a deadlock :-(
5:03:28 PM Comments
|
|