On Mon, Feb 23, 2004 at 01:14:36PM +0000, Graham Carlyle wrote:
> --
> 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"
I'm not sure you're supposed to call threads_init() this late in life.
Now, never having used threads before, I'm going to ask Johan and
Gustavo to tell us what they think of this. I'm not sure about this:
> static void
> pyobject_free(gpointer boxed)
> {
> PyObject *object = boxed;
>
> + pyg_block_threads();
> Py_DECREF(object);
> + pyg_unblock_threads();
> }
Isn't Py_DECREF supposed to be an atomic operation?
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/