[Mono-winforms-list] Threading problem?

macusr74 vpereira0125 at rogers.com
Thu Nov 25 15:24:12 EST 2010


Hi guys,

We are trying our existing .net app with Mono 2.8.1 in MAC OS 10.6.2, and so
far we only have one problem. It's related to calling Invoke from a
threadpool thread.

The first thing this app does is showing a splash window (a form). Within
this form, we queue the actual initialization process
(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.

So, it seems that every time the background thread calls the form's
Invoke/BeginInvoke with the appropriate parameters, the thread blocks.

Any idea on what could be wrong, and how to address that? The same code
works fine in Windows, and Linux.

Thanks!

-- 
View this message in context: http://mono.1490590.n4.nabble.com/Threading-problem-tp3059476p3059476.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.


More information about the Mono-winforms-list mailing list