[Mono-bugs] [Bug 41292][Maj] Changed - Some threads blocking on AutoResetEvent.WaitOne don't receive event

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 14 Jun 2004 09:21:30 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by dick@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=41292

--- shadow/41292	2003-07-29 09:34:11.000000000 -0400
+++ shadow/41292.tmp.11980	2004-06-14 09:21:30.000000000 -0400
@@ -1,12 +1,12 @@
 Bug#: 41292
-Product: Mono/Class Libraries
+Product: Mono: Class Libraries
 Version: unspecified
 OS: GNU/Linux [Other]
 OS Details: 
-Status: NEEDINFO   
+Status: REOPENED   
 Resolution: 
 Severity: Unknown
 Priority: Major
 Component: System
 AssignedTo: dick@ximian.com                            
 ReportedBy: r.h.lee@attbi.com               
@@ -85,6 +85,42 @@
 ------- Additional Comments From dick@ximian.com  2003-07-29 09:34 -------
 According to all the w32 documentation I can find (including the
 .net class docs) setting an AutoResetEvent should only release one
 thread, even if many are waiting.  Do you have some contradictory
 documentation?
 
+
+------- Additional Comments From gonzalo@ximian.com  2003-08-11 21:15 -------
+From the MS documentation on CreateEvent:
+
+"When the state of an auto-reset event object is signaled, it remains
+signaled until a single waiting thread is released; the system then
+automatically resets the state to nonsignaled. If no threads are
+waiting, the event object's state remains signaled."
+
+It says that when 1 single thread released, the state is changed to
+nonsignaled, but doesn't specify that it will only wake up 1 thread...
+
+Moreover, running the test under MS runtime it says "Test Ok" for all
+the tests.
+
+Under mono with current CVS, only 1 fails:
+*** Testing multiple thread blocks on AutoResetEvent ***
+The following thread ids did not receive an event:
+   Thread #1
+   Thread #2
+   Thread #3
+   Thread #4
+Test Failed
+
+
+
+------- Additional Comments From r.h.lee@attbi.com  2003-08-13 06:22 -------
+AutoResetEvent should only release one waiting thread per call to Set().
+
+The test case fails when call Set() is called from another thread, but
+works fine called from the same thread.
+
+------- Additional Comments From dick@ximian.com  2004-06-14 09:21 -------
+Additional test: 
+http://msdn.microsoft.com/library/en-us/csref/html/vcwlkThreadingTutorial.asp?frame=true#vcwlkthreadingtutorialexample4mutex
+