[pulseaudio-tickets] [PulseAudio] #430: Threaded mainloop API steals signals unnecessarily
PulseAudio
trac-noreply at tango.0pointer.de
Sat Dec 20 06:41:37 PST 2008
#430: Threaded mainloop API steals signals unnecessarily
------------------------+---------------------------------------------------
Reporter: jcornwall | Owner: lennart
Type: defect | Status: closed
Priority: normal | Milestone:
Component: libpulse | Severity: normal
Resolution: invalid | Keywords:
------------------------+---------------------------------------------------
Comment (by jcornwall):
Thanks for the explanation. My assumption of pthread_sigmask was upside
down; I had thought that SIG_BLOCK diverted signals to, rather than away
from, that thread.
I had already tried intercepting callbacks to restore signals prior to
making this bug report. It should have worked but I hadn't expected
PulseAudio to invoke callbacks from multiple threads (the state callback
is first called from the blocked pa_context_connect call and only
afterwards from the mainloop thread) and had incorrectly optimised the
pthread_sigmask call to occur only once. Now I simply check if the thread
has been seen before and unblock signals if it hasn't, which works fine.
I will take this up with the Mono developers as it seems to be a bug to
assume that any thread entering managed code receives the signals that the
runtime requires. Quite what they do with those signals will be
interesting to find out!
--
Ticket URL: <http://pulseaudio.org/ticket/430#comment:2>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server
More information about the pulseaudio-bugs
mailing list