[Mono-winforms-list] Threading problem?

Vladimir Pereira vpereira0125 at rogers.com
Tue Nov 30 10:02:14 EST 2010


Hi guys, 
 
Some more info on this.
 
We've created a small test app (attached, so you can see the details.created
with VS 2005). It's a single form app containing a label, and a button
controls. The idea is to execute some work in a threadpool thread when the
button is clicked, and from there update the UI element (label). It's very
simple.
 
If you run the app in windows, everything looks fine (the label control gets
updated as expected).
 
However, in MAC 10.6.2 with Mono 2.8.1, the label control only gets updated
when there is some activity in the UI (like moving the mouse). If you only
click on the button, the label won't get updated.
 
Is this a bug? Or are we just doing something wrong?
 
Regards
 
From: miguel.novell at gmail.com [mailto:miguel.novell at gmail.com] On Behalf Of
Miguel de Icaza
Sent: November 27, 2010 12:06 PM
To: macusr74
Cc: mono-winforms-list at lists.ximian.com
Subject: Re: [Mono-winforms-list] Threading problem?
 
(ThreadPool.QueueUserWorkItem) so that it is executed in the background. We
do show progress by updating the text of a label control by calling the
form's Invoke method (Invoke(new MethodInvoker(updateProgress))).

The problem is that we see the text being updated the first time, but the
process gets blocked until the mouse is moved over the splash window, then
things continue to work until the next call to the form's Invoke. For some
reason, moving the mouse over the splash window gets the thread out of that
blocked state.
 
It is possible that there is a bug in our code in that area.
 
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20101130/0108a640/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WindowsApplication1.zip
Type: application/octet-stream
Size: 27126 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20101130/0108a640/attachment-0001.obj 


More information about the Mono-winforms-list mailing list