[pulseaudio-discuss] thread safe of idxset

Tong Wu w_tong2000 at yahoo.com
Wed Feb 20 16:46:05 PST 2013


I see that for instance in function apply_cork_to_sink() in module-role-cork.c, there is a loop over all sink_inputs of a sink via idxset. What about a sink_input disappears during that loop?
Is apply_cork_to_sink()  running in the PA daemon's mainloop? And all sink_input's come and go only happen in the PA daemon's mainloop as well?

Many thanks.

Tony 


________________________________
 From: Tanu Kaskinen <tanuk at iki.fi>
To: Tong Wu <w_tong2000 at yahoo.com> 
Cc: "pulseaudio-discuss at lists.freedesktop.org" <pulseaudio-discuss at lists.freedesktop.org> 
Sent: Wednesday, February 20, 2013 2:58 PM
Subject: Re: [pulseaudio-discuss] thread safe of idxset
 
On Wed, 2013-02-20 at 14:52 -0800, Tong Wu wrote:
> Is the loop over sink-input idxset of a sink thread safe? For
> instance, when a sink-input disappears due to the end of playback, and
> at the same time I am trying to loop over the related idxset hoding
> the sink-input?

pa_idxset is not thread safe. What code are you working on?

-- 
Tanu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20130220/1d3e95ca/attachment.html>


More information about the pulseaudio-discuss mailing list