Tom Morton wrote:

>I'm using python 2.2b1, pygtk 1.99.5 and gtk 1.3.11.
>
>If i compile pygtk with --enable-thread then pygtk programs simply crash
>immediately with a segfault. without threading they work fine, but i need
>threading support. is there a way of getting the nice tasty threads_enter/
>leave() thing that pygtk 0.6.x had, or any way of using threading?
>
Currently threading is not supported at all, which is why 
--enable-thread defaults to no for now.

Sopwith produced a patch (which was a bit of a hack) to support 
threading.  Given the current schedule, we should probably put in some 
threading support based on these patches.

This support will probably be turned off by default, but be possible to 
turn on at runtime (this is to mirror gtk+, where threading must be 
explicitly enabled with the gdk_thread_init() call now).  It will most 
likely look something like:
  import gtk
  gtk.enable_threads()

I have slightly modified zilch's threads disable patch on the stable 
branch (this is is a way to get round the applet/dialog deadlock problem 
someone was experiencing recently), to make it more convenient.  Now, 
you can do:
  import gtk
  gtk._disable_gdk_threading()

(this uses a hack suggested by owen, of setting gdk_thread_mutex to NULL 
after initialising gtk in order to disable gtk thread support).

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to