On Thu, Dec 15, 2011 at 08:33:16PM +0100, Dieter Verfaillie wrote:
> On Thu, 15 Dec 2011 19:37:03 +0100, Marcin Szewczyk wrote:
> >On Thu, Dec 15, 2011 at 03:08:10PM +0100, Dieter Verfaillie wrote:
> >>Looking at GLib docs [2] we learn that: "... A GMainContext can only
> >>be running in a single thread, ...". Looks to me that what you are
> >>trying to do is not possible?
> >
> >If I understand the code above correctly, gtk.main() is still used
> >in a
> >single thread, just not the main one. So I can't agree the quoted
> >documentation explicitly forbids that.
> 
> You mean "Thread(target = gtk.main, name = "GTK thread")"?
> If so, "target" is the callable object to be invoked by the run()
> method.
> Whatever is executed by the run() method runs in in the new thread
> you created, not the main thread.

Have I stated otherwise?


For me words "single" and "main" mean something completely different.

If I read "single" thread, for me it means "execute gtk.main() only in
one (arbitrarily chosen) thread" -- which by the way seems to be the
case here.

If I read "main" thread, for me it means "execute gtk.main() only in the
main thread". As there is only one main thread it also means I can run
gtk.main() in only one thread.

Documentation states it is "single". It doesn't say "main".

-- 
Marcin Szewczyk                       http://wodny.org
mailto:marcin.szewc...@wodny.borg  <- remove b / usuĊ„ b
xmpp:wo...@ubuntu.pl                  xmpp:wo...@jabster.pl
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to