aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_input.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-10-07 20:02:13 +0200
committerMax Kellermann <max@duempel.org>2014-10-07 20:02:13 +0200
commit1aac0b10c9499db77cbe39e43a0abc8cccc72079 (patch)
tree4a8fa128ac33a33a7223dd53e397547b086f6fff /test/run_input.cxx
parente5ff85b63c0ef342b11cb1ac5b5808091f51b667 (diff)
downloadmpd-1aac0b10c9499db77cbe39e43a0abc8cccc72079.tar.gz
mpd-1aac0b10c9499db77cbe39e43a0abc8cccc72079.tar.xz
mpd-1aac0b10c9499db77cbe39e43a0abc8cccc72079.zip
test/run_input, ...: add struct ScopeIOThread
Auto-stop the IO thread in all error handlers.
Diffstat (limited to 'test/run_input.cxx')
-rw-r--r--test/run_input.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/run_input.cxx b/test/run_input.cxx
index 1d8cf3a28..de5bd9632 100644
--- a/test/run_input.cxx
+++ b/test/run_input.cxx
@@ -24,7 +24,7 @@
#include "config/ConfigGlobal.hxx"
#include "input/InputStream.hxx"
#include "input/Init.hxx"
-#include "IOThread.hxx"
+#include "ScopeIOThread.hxx"
#include "util/Error.hxx"
#include "thread/Cond.hxx"
#include "Log.hxx"
@@ -123,8 +123,7 @@ int main(int argc, char **argv)
config_global_init();
- io_thread_init();
- io_thread_start();
+ const ScopeIOThread io_thread;
#ifdef ENABLE_ARCHIVE
archive_plugin_init_all();
@@ -160,8 +159,6 @@ int main(int argc, char **argv)
archive_plugin_deinit_all();
#endif
- io_thread_deinit();
-
config_global_finish();
return ret;