Skip to content

Commit

Permalink
Wait for the PositionWatcher thread to stop
Browse files Browse the repository at this point in the history
  • Loading branch information
aronbierbaum committed Jul 12, 2018
1 parent 34afa14 commit 58eccea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/output/audio/AudioOutputDSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ bool AudioOutputDSound::close()
available = false;
destroy();
CloseHandle(notify_event); // FIXME: is it ok if thread is still waiting?

// Wait for the PositionWatcher thread to stop.
while (watcher.isRunning()) {
watcher.wait(500);
}

return true;
}

Expand Down

0 comments on commit 58eccea

Please sign in to comment.