Skip to content
Commit 6f1bc1a5 authored by Torsten Schönfeld's avatar Torsten Schönfeld
Browse files

Make signal marshalling more thread-safe

When a signal that has Perl handlers is emitted from a non-main non-Perl
thread, we used to simply use PERL_SET_CONTEXT to associate this thread
with the main Perl interpreter.  But since it is not safe to call into
one Perl interpreter concurrently, this does not work.

Instead we now, upon noticing that we are being called from a thread
without asoociated Perl interpreter, hand the marshalling request over
to the main loop which in turn later wakes up the main thread and lets
it handle the request.

dGPERL_CLOSURE_MARSHAL_ARGS also needed to be adjusted not to use dSP
since that dereferences the current thread's Perl interpreter without
NULL check.

https://bugzilla.gnome.org/show_bug.cgi?id=620099
parent 5460fc9f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment