From cabdf4a84ab8cc15bbbfae018508653030233684 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Thu, 2 Sep 2010 22:04:35 +0200 Subject: [PATCH] clear extensions method allows saver reset of MT engine --- FDTD/engine.cpp | 11 ++++++++--- FDTD/engine.h | 1 + FDTD/engine_multithread.cpp | 5 +++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/FDTD/engine.cpp b/FDTD/engine.cpp index b93aaca..0d1e511 100644 --- a/FDTD/engine.cpp +++ b/FDTD/engine.cpp @@ -73,6 +73,13 @@ void Engine::InitExtensions() } } +void Engine::ClearExtensions() +{ + for (size_t n=0;n m_Eng_exts; ofstream file_et, file_ht; //excite signal dump file diff --git a/FDTD/engine_multithread.cpp b/FDTD/engine_multithread.cpp index b9c4c1d..55eed90 100644 --- a/FDTD/engine_multithread.cpp +++ b/FDTD/engine_multithread.cpp @@ -133,8 +133,9 @@ void Engine_Multithread::Init() void Engine_Multithread::Reset() { - if (!m_stopThreads) { - // prevent multiple invocations + if (!m_stopThreads) // prevent multiple invocations + { + ClearExtensions(); //prevent extensions from interfering with thread reset... // stop the threads //NS_Engine_Multithread::DBG().cout() << "stopping all threads" << endl;