test/run_input, ...: add struct ScopeIOThread

Auto-stop the IO thread in all error handlers.
This commit is contained in:
Max Kellermann
2014-10-07 20:02:13 +02:00
parent e5ff85b63c
commit 1aac0b10c9
9 changed files with 57 additions and 32 deletions

View File

@@ -21,7 +21,7 @@
#include "stdbin.h"
#include "tag/Tag.hxx"
#include "config/ConfigGlobal.hxx"
#include "IOThread.hxx"
#include "ScopeIOThread.hxx"
#include "input/Init.hxx"
#include "archive/ArchiveList.hxx"
#include "archive/ArchivePlugin.hxx"
@@ -65,8 +65,7 @@ main(int argc, char **argv)
config_global_init();
io_thread_init();
io_thread_start();
const ScopeIOThread io_thread;
archive_plugin_init_all();
@@ -101,8 +100,6 @@ main(int argc, char **argv)
archive_plugin_deinit_all();
io_thread_deinit();
config_global_finish();
return result;