• Max Kellermann's avatar
    PlayerControl: add second Cond object · a9b62a2e
    Max Kellermann authored
    This fixes a deadlock bug introduced by 18076ac9.  After all, the
    second Cond was necessary.
    
    The problem: two threads can wait for a signal at the same time.  The
    player thread waits for the output thread to finish playback.  The
    main thread waits for the player thread to complete a command.  The
    output thread finishes playback, and sends a signal, which
    unfortunately does not wake up the player thread, but the main
    thread.  The main thread sees that the command is still not finished,
    and waits again.  The signal is lost forever, and MPD is deadlocked.
    a9b62a2e
Name
Last commit
Last update
doc Loading commit data...
m4 Loading commit data...
scripts Loading commit data...
src Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
UPGRADING Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
mpd.service.in Loading commit data...
valgrind.suppressions Loading commit data...