aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-10 14:05:06 +0200
committerMax Kellermann <max@duempel.org>2013-08-10 14:05:06 +0200
commit5c48d3fbba0c7f7e7dbec7d2409938a57331ff11 (patch)
tree94f62a8df8e6a366229be8069076f75d064d28ec /src
parent00420ef9cae3835df02186bb9d9a5cefcff00a21 (diff)
downloadmpd-5c48d3fbba0c7f7e7dbec7d2409938a57331ff11.tar.gz
mpd-5c48d3fbba0c7f7e7dbec7d2409938a57331ff11.tar.xz
mpd-5c48d3fbba0c7f7e7dbec7d2409938a57331ff11.zip
alsa/mixer: defer InvalidateSockets() call to I/O thread
Diffstat (limited to '')
-rw-r--r--src/mixer/AlsaMixerPlugin.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mixer/AlsaMixerPlugin.cxx b/src/mixer/AlsaMixerPlugin.cxx
index 7bfdbb7eb..587ec699e 100644
--- a/src/mixer/AlsaMixerPlugin.cxx
+++ b/src/mixer/AlsaMixerPlugin.cxx
@@ -23,6 +23,7 @@
#include "GlobalEvents.hxx"
#include "Main.hxx"
#include "event/MultiSocketMonitor.hxx"
+#include "event/Loop.hxx"
#include "util/ReusableArray.hxx"
#include <algorithm>
@@ -42,7 +43,7 @@ class AlsaMixerMonitor final : private MultiSocketMonitor {
public:
AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer)
:MultiSocketMonitor(_loop), mixer(_mixer) {
- InvalidateSockets();
+ _loop.AddCall([this](){ InvalidateSockets(); });
}
private: