Re: Threading problem?

"Vladimir Pereira" <[email protected]>
Newsgroups gmane.comp.gnome.winforms
Message-ID <04e501cb909f$933672d0$b9a35870$@com>
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: [email protected] [mailto:[email protected]] On Behalf Of
Miguel de Icaza
Sent: November 27, 2010 12:06 PM
To: macusr74
Cc: [email protected]
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

_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list
WindowsApplication1.zip (application/octet-stream, 26.5 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.