From af816bd541c50a55c3ede6b4ac5970bd641d5f5f Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Mon, 6 Apr 2020 15:48:56 +0200 Subject: [PATCH] Simplify the write thread flow --- core-writer/src/module/H5WriteModule.cpp | 33 +++++++----------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/core-writer/src/module/H5WriteModule.cpp b/core-writer/src/module/H5WriteModule.cpp index bcfdcde..c09302e 100644 --- a/core-writer/src/module/H5WriteModule.cpp +++ b/core-writer/src/module/H5WriteModule.cpp @@ -198,31 +198,18 @@ void H5WriteModule::write_thread( writer.write_metadata_to_file(); write_h5_format(writer.get_h5_file()); + writer.close_file(); } - - #ifdef DEBUG_OUTPUT - using namespace date; - using namespace chrono; - - cout << "[" << system_clock::now() << "]"; - cout << "[H5WriteModule::write_thread]"; - cout << " Closing file " << output_file << endl; - #endif - - writer.close_file(); - - #ifdef DEBUG_OUTPUT - using namespace date; - using namespace chrono; - - cout << "[" << system_clock::now() << "]"; - cout << "[H5WriteModule::write_thread]"; - cout << " Writer thread stopped." << endl; - #endif - - writing_completed(); - } catch (const exception& ex) { writing_error(ex.what()); } + + #ifdef DEBUG_OUTPUT + using namespace date; + using namespace chrono; + + cout << "[" << system_clock::now() << "]"; + cout << "[H5WriteModule::write_thread]"; + cout << " Write thread stopped." << endl; + #endif }