A Seg, 2004-02-23 �s 13:14, Graham Carlyle escreveu:
> I've been getting python thread deaths in an application which uses gtk
> ListStores that maintain references to python objects.
> 
> isolated the problem to this example code:
> --
> import pygtk
> pygtk.require("2.0")
> import gc
> import gobject
> import gtk
> 
> class Foo:
>     pass
> 
> list_store = gtk.ListStore(gobject.TYPE_PYOBJECT)
> list_store.prepend((Foo(),))
> gtk.threads_init()
> list_store = None
> gc.collect()
> --
> results in the message:
> "Fatal Python error: PyThreadState_Get: no current thread
> Aborted"

  Well, with new style classes (class Foo(object): pass), that problem
doesn't occur.

-- 
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to