diff options
author | Max Kellermann <max@duempel.org> | 2014-10-07 20:02:13 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-10-07 20:02:13 +0200 |
commit | 1aac0b10c9499db77cbe39e43a0abc8cccc72079 (patch) | |
tree | 4a8fa128ac33a33a7223dd53e397547b086f6fff /test/dump_playlist.cxx | |
parent | e5ff85b63c0ef342b11cb1ac5b5808091f51b667 (diff) | |
download | mpd-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/dump_playlist.cxx')
-rw-r--r-- | test/dump_playlist.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx index 6205c8a79..0047ef427 100644 --- a/test/dump_playlist.cxx +++ b/test/dump_playlist.cxx @@ -25,7 +25,7 @@ #include "config/ConfigGlobal.hxx" #include "decoder/DecoderList.hxx" #include "input/Init.hxx" -#include "IOThread.hxx" +#include "ScopeIOThread.hxx" #include "playlist/PlaylistRegistry.hxx" #include "playlist/PlaylistPlugin.hxx" #include "fs/Path.hxx" @@ -82,8 +82,7 @@ int main(int argc, char **argv) return EXIT_FAILURE; } - io_thread_init(); - io_thread_start(); + const ScopeIOThread io_thread; if (!input_stream_global_init(error)) { LogError(error); @@ -155,7 +154,6 @@ int main(int argc, char **argv) decoder_plugin_deinit_all(); playlist_list_global_finish(); input_stream_global_finish(); - io_thread_deinit(); config_global_finish(); return 0; |