[Mono-bugs] [Bug 77109][Maj] New - Control.Invoke is broken (not
synchronous)
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Dec 28 07:51:00 EST 2005
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 jake4379 at fastmail.fm.
http://bugzilla.ximian.com/show_bug.cgi?id=77109
--- shadow/77109 2005-12-28 07:51:00.000000000 -0500
+++ shadow/77109.tmp.25795 2005-12-28 07:51:00.000000000 -0500
@@ -0,0 +1,75 @@
+Bug#: 77109
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com
+ReportedBy: jake4379 at fastmail.fm
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Control.Invoke is broken (not synchronous)
+
+Description of Problem:
+
+Control.Invoke should wait for the action to complete (it is not
+synchronous)
+
+Steps to reproduce the problem:
+1. Create a form, create a new thread, use Control.Invoke from the thread
+and see if it is synchronous.
+
+
+using System;
+using System.Threading;
+using System.Windows.Forms;
+
+class M {
+ static Form f;
+ static void Main() {
+ f = new Form();
+ f.Paint += new PaintEventHandler(startThread);
+ Application.Run(f);
+ }
+ static void startThread(object sender, PaintEventArgs args) {
+ Thread t = new Thread(new ThreadStart(run));
+ t.Start();
+ }
+ static void run() {
+ f.Invoke(new MethodInvoker(run2));
+ Console.WriteLine("Should Come Second");
+ }
+ static void run2() {
+ Thread.Sleep(100);
+ Console.WriteLine("Should Come First");
+ }
+
+}
+
+Actual Results:
+
+Mono System.Windows.Forms Assembly [Revision: 54007; built: 2005/12/6
+14:35:24]
+Should Come Second
+Should Come First
+
+
+Expected Results:
+
+Mono System.Windows.Forms Assembly [Revision: 54007; built: 2005/12/6
+14:35:24]
+Should Come First
+Should Come Second
+
+
+How often does this happen?
+
+Always
+
+Additional Information:
More information about the mono-bugs
mailing list