[Gtk-sharp-list] A better interface for invoking on the UI thread.
doug.blank at gmail.com
Mon Oct 8 14:25:08 UTC 2012
On Mon, Oct 8, 2012 at 5:19 AM, Daniel Hughes <trampster at gmail.com> wrote:
> Hi guys,
> I have done a blog post detailing the method I use for invoking on the UI
> thread in widemargin in the hope that others might find it useful. You can
> read it here:
Brilliant! I had also developed the same as keeping track of the
thread and invoking when needed, but adding it as an Extension Method
to the Gtk.Widget is a great idea.
One question: in the initial call of RevokeRequired, won't the
Application.Invoke get sent off to the GUI thread, and thus the return
value will be wrong because the setting of _uiThread won't have
completed yet? or am I mistaken?
I guess you could have a special InitializeRevoke. BTW, We have found
that the GUI thread is always the same (0 or 1, I forget). I wonder if
that will always be the case?
Thanks for sharing!
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
More information about the Gtk-sharp-list