<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:tanuk@iki.fi" title="Tanu Kaskinen <tanuk@iki.fi>"> <span class="fn">Tanu Kaskinen</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - pa_mainloop_quit() can't make pa_mainloop_run exit"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=56735">bug 56735</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - pa_mainloop_quit() can't make pa_mainloop_run exit"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=56735#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - pa_mainloop_quit() can't make pa_mainloop_run exit"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=56735">bug 56735</a>
              from <span class="vcard"><a class="email" href="mailto:tanuk@iki.fi" title="Tanu Kaskinen <tanuk@iki.fi>"> <span class="fn">Tanu Kaskinen</span></a>
</span></b>
        <pre>The brokenness of pa_mainloop_wakeup() has now been fixed:
<a href="http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=872f56dc7ec43cb1511ef0d25c1736a373b3c2e2">http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=872f56dc7ec43cb1511ef0d25c1736a373b3c2e2</a>

Yupeng, unfortunately I've come to the conclusion (after getting feedback from
Arun) that it's actually not supported to call pa_mainloop_quit() from a
different thread. It will probably continue working quite well in practice in
3.0 (better than 2.x now that the pa_mainloop_wakeup() bug has been fixed), but
it will be completely broken in 4.0, because the pa_mainloop_wakeup() call will
be removed from pa_mainloop_quit(). The thing is that pa_mainloop_quit() is not
a thread-safe function, because it directly modifies the mainloop state which
is supposed to be accessed only from the thread where the mainloop runs. The
only thread-safe function in the pa_mainloop API is pa_mainloop_wakeup().

If you really need to quit the mainloop from a different thread, create an IO
event (using a pipe, for example) that you trigger from the other thread.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>