GNOME Bugzilla – Bug 395048
set_property() doesn't release the GIL
Last modified: 2007-03-03 13:31:20 UTC
Currently, when setting a property on an object, the GIL isn't released in set_property_from_pspec . It should be released, since there's no guarantee that there will never be: _ some code will be called in that code that will trigger a callback of some python code (and therefore needing the GIL) _ some code in a different thread that needs to call some python code, before releasing a lock which is needed by the thread currently calling .set_property() The GIL needs to be released in order for other python code to be called while set_property() is happening, and avoid deadlocks.
Created attachment 79959 [details] [review] Proposed patch
Comment on attachment 79959 [details] [review] Proposed patch This looks okay to me, feel free to commit it SVN trunk.
2007-03-03 Edward Hervey <edward@fluendo.com> * gobject/pygobject.c: (set_property_from_pspec): Release the GIL when calling g_object_set_property, since setting a property might trigger some code that might come back in python land. Fixes #395048