test/run_input, ...: add struct ScopeIOThread
Auto-stop the IO thread in all error handlers.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user