Re: [PATCH] Re: dialog#run seems to block other threads

Richard Jones <[email protected]> Tue, 22 Jun 2010 19:10:39 +0100
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
On Tue, Jun 22, 2010 at 06:53:38PM +0100, Richard Jones wrote:
> I have applied the following patch to my local copy, which appears to
> cure the problem for me.  I don't know if it is safe to release the
> lock at this point, perhaps someone who knows the code a bit better
> could comment.

Although this doesn't solve my greater problem:

The worker thread cannot send events to the dialog (main thread) using
GtkThread.async.  Those events seem to be delivered to the ordinary
Gtk main loop, but gtk_dialog_run creates a secondary, hidden main
loop.  As a result the dialog never sees the events and they only
appear after the dialog is closed.

Anyway, the patch I posted seems good, provided you're not trying
to send events between your threads ...

Rich.

-- 
Richard Jones
Red Hat