Additional Monitors test cases

Russell Stuart <[email protected]>
Newsgroups gmane.comp.gnu.dotgnu.developer
Organization Lube Mobile PTY LTD
Message-ID <1083645617.1574.26.camel@ras>
I have put up a patch for you to look at.
  https://savannah.gnu.org/patch/index.php?func=detailitem&item_id=3006

The patch just adds some more tests for monitors.  I have verified that
all the tests pass when run under VS.  I wrote the tests originally to
demonstrate a bug in Monitor.Wait().  They failed miserably at that
task, but it turns out they do show up a bug in Interrupting
System.Threading.Thread.Sleep(), so they ended up being good for
something.  If you agree either apply it yourself, or let me know and I
will apply it.

The bug I was trying to demonstrate now think is dammed near impossible
to demonstrate with a test.  In the current CVS,
  pnet/support/wait_mutex.c, line 587,
ILWaitMonitorWait calls ILWaitOne.  ILWaitOne will return
IL_WAIT_INTERRUPTED if there is an interrupt pending.  At least I think
so - I can't see anything that would prevent it from doing that.  I am
fairly sure it should not be possible to interrupt or abort that wait. 
The MS doco is vague on the issue, but the Java docs for java the
equivalent aren't:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)

The books I have say the C# implementation is meant to mimic the Java
one.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.