From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-05-30 15:17:38
|
https://bugzilla.gnome.org/show_bug.cgi?id=620099 gnome-perl | Glib | unspecified --- Comment #2 from Torsten Schoenfeld <kaf...@gm...> 2010-05-30 15:17:24 UTC --- Created an attachment (id=162318) View: https://bugzilla.gnome.org/attachment.cgi?id=162318 Review: https://bugzilla.gnome.org/review?bug=620099&attachment=162318 Clone the master perl interpreter if called from another thread Rename GPERL_SET_CONTEXT to GPERL_ENSURE_CONTEXT and make it clone the master interpreter if we find that the current thread doesn't have an interpreter associated with it. Previously, we would just install the master interpreter itself. And according to L<perlguts/"Should I do anything special if I call perl from multiple threads?">, this should be all there is to it. But apparently, this is not safe if we actually call into the interpreter concurrently. The discussion at <http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2005-12/msg00452.html> suggests that we need to create a clone. And when a thread already has an interpreter installed, don't replace it. We cannot use one thread's interpreter in another thread. To make this have an effect on closure invocation, change GPERL_CLOSURE_MARSHAL_INIT to use GPERL_ENSURE_CONTEXT instead of PERL_SET_CONTEXT. Also, add a few debug prints to the CLONE machinery in Glib::Object. -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |