[Mono-bugs] [Bug 78455][Min] New - WaitHandle.WaitAll() for multiple handle for STA thread

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri May 19 04:50:41 EDT 2006


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 atsushi at ximian.com.

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

--- shadow/78455	2006-05-19 04:50:40.000000000 -0400
+++ shadow/78455.tmp.27573	2006-05-19 04:50:41.000000000 -0400
@@ -0,0 +1,59 @@
+Bug#: 78455
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: WaitHandle.WaitAll() for multiple handle for STA thread
+
+Seems like WaitHandle.WaitAll() for multiple handle for STA thread is
+prohibited on .NET. Mono simply allows it.
+
+using System;
+using System.Threading;
+
+public class Test
+{
+        [STAThread]
+        public static void Main ()
+        {
+                AutoResetEvent ae = new AutoResetEvent (true);
+                AutoResetEvent ae2 = new AutoResetEvent (true);
+                WaitHandle.WaitAll (new WaitHandle [] {ae, ae2}, 1000, true);
+        }
+}
+
+Actual Results:
+
+no error.
+
+Expected Results:
+
+$ ./sta-waitall.exe
+
+Unhandled Exception: System.NotSupportedException: WaitAll for multiple
+handles on an STA thread is not supported.
+   at System.Threading.WaitHandle.WaitMultiple(WaitHandle[] waitHandles,
+Int32 millisecondsTimeout, Boolean exitContext, Boolean WaitAll)
+   at System.Threading.WaitHandle.WaitAll(WaitHandle[] waitHandles, Int32
+millisecondsTimeout, Boolean exitContext)
+   at Test.Main()
+
+How often does this happen? 
+
+consistently.
+
+Additional Information:
+
+When this bug got fixed, it will block our PaintDotNet.exe. (i.e. currently
+our PaintDotNet.exe does not run on .NET)


More information about the mono-bugs mailing list