From 1aac0b10c9499db77cbe39e43a0abc8cccc72079 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Oct 2014 20:02:13 +0200 Subject: test/run_input, ...: add struct ScopeIOThread Auto-stop the IO thread in all error handlers. --- test/dump_text_file.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'test/dump_text_file.cxx') diff --git a/test/dump_text_file.cxx b/test/dump_text_file.cxx index 03f8114a4..5bfd316a5 100644 --- a/test/dump_text_file.cxx +++ b/test/dump_text_file.cxx @@ -18,7 +18,7 @@ */ #include "config.h" -#include "IOThread.hxx" +#include "ScopeIOThread.hxx" #include "input/Init.hxx" #include "input/InputStream.hxx" #include "input/TextInputStream.hxx" @@ -91,8 +91,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(); @@ -129,8 +128,6 @@ int main(int argc, char **argv) archive_plugin_deinit_all(); #endif - io_thread_deinit(); - config_global_finish(); return ret; -- cgit v1.2.3