Updated: 3/13/2003; 2:20:26 PM.
IKVM.NET Weblog
The development of a Java VM for .NET
        

Tuesday, October 29, 2002
This weblog has moved to http://weblog.ikvm.net/

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

© Copyright 2003 Jeroen Frijters.
 
October 2002
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Sep   Nov