RE: Additional Monitors test cases
"Thong (Tum) Nguyen" <tum-x2aT3/[email protected]>
| Newsgroups | gmane.comp.gnu.dotgnu.developer |
|---|---|
| Message-ID | <[email protected]> |
Hi Russell, I've fixed the bug and committed the test cases (thanks). Do you still get a problem with Monitor.Wait()? All the best, ^Tum > -----Original Message----- > From: Russell Stuart [mailto:[email protected]] > Sent: Tuesday, 4 May 2004 4:40 p.m. > To: Thong (Tum) Nguyen > Cc: [email protected] > Subject: [DotGNU]Additional Monitors test cases > > 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. > > > _______________________________________________ > Developers mailing list > [email protected] > http://dotgnu.org/mailman/listinfo/developers