[pygtk] More Help: Problems with the solution to: threads and pygtk
David Hirschfield
davidh at ilm.com
Fri Oct 6 05:30:31 WST 2006
I don't have time right now to come up with a test case that
definitively demonstrates the problem. I had enough trouble getting it
to happen consistently to me. It seems only to happen when I load data
via the database and network connections I have, but would probably
happen in other cases as well, since it appears to be garbage-collection
related.
Here's the issue now: I don't know much about how the garbage collector
works in python, and in order to get the thread to run without freezing,
I'm wrapping the threaded processing function with calls to
gc.disable()/gc.enable().
So what's that going to do? Will calling gc.enable() put things in good
shape? Will all objects created while the garbage collector was off now
be un-collectable? I'm extremely wary of this solution, as I think
anyone would be. I don't want a suddenly super-leaky app.
Suggestions? Anyone else want to chime in?
-Dave
John Ehresman wrote:
> David Hirschfield wrote:
>> Holy garbage collection, Batman!
>> ...
>> Thanks for the tip, have you encountered similar problems before?
>
> Would it be possible for you to open a bug on bugzilla.gnome.org for
> this, preferably with a small test case?
>
> I've wondered if this could be a problem, but had never encountered it
> -- probably because I try to stay as far away from threads as possible.
>
> Thanks,
>
> John
>
--
Presenting:
mediocre nebula.
More information about the pygtk
mailing list