<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - data race in pa_queue_pop/pa_queue_push reported by TSan"
href="https://bugs.freedesktop.org/show_bug.cgi?id=99667#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - data race in pa_queue_pop/pa_queue_push reported by TSan"
href="https://bugs.freedesktop.org/show_bug.cgi?id=99667">bug 99667</a>
from <span class="vcard"><a class="email" href="mailto:fabrice@bellet.info" title="Fabrice Bellet <fabrice@bellet.info>"> <span class="fn">Fabrice Bellet</span></a>
</span></b>
<pre>Thank you for your time of this case. With your suggestion, I confirm that
delaying the work from the notify callback of the gstreamer thread, so that it
happens in the glib mainloop thread instead, works for me and makes tsan happy:
<span class="quote">> @@ -551,7 +554,13 @@ empathy_mic_monitor_get_current_mic_async (EmpathyMicMonitor *self,
> operation = operation_new (operation_get_current_mic, simple);
> g_queue_push_tail (priv->operations, operation);
>
> - operations_run (self);
> + /* we make sure this function containing pulseaudio operations is
> + * called from the default mainloop, by the same thread than the
> + * one running the pa_glib_mainloop. This is needed because PA
> + * is not thread-safe. Other functions calling operations_run()
> + * are called from the main thread, and don't need this indirection.
> + */
> + g_idle_add (operations_run, self);
> }
>
> guint</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>