clear extensions method allows saver reset of MT engine
parent
200832b423
commit
cabdf4a84a
|
@ -73,6 +73,13 @@ void Engine::InitExtensions()
|
|||
}
|
||||
}
|
||||
|
||||
void Engine::ClearExtensions()
|
||||
{
|
||||
for (size_t n=0;n<m_Eng_exts.size();++n)
|
||||
delete m_Eng_exts.at(n);
|
||||
m_Eng_exts.clear();
|
||||
}
|
||||
|
||||
void Engine::Reset()
|
||||
{
|
||||
Delete_N_3DArray(volt,numLines);
|
||||
|
@ -83,9 +90,7 @@ void Engine::Reset()
|
|||
file_et.close();
|
||||
file_ht.close();
|
||||
|
||||
for (size_t n=0;n<m_Eng_exts.size();++n)
|
||||
delete m_Eng_exts.at(n);
|
||||
m_Eng_exts.clear();
|
||||
ClearExtensions();
|
||||
}
|
||||
|
||||
void Engine::UpdateVoltages(unsigned int startX, unsigned int numX)
|
||||
|
|
|
@ -80,6 +80,7 @@ protected:
|
|||
unsigned int numTS;
|
||||
|
||||
virtual void InitExtensions();
|
||||
virtual void ClearExtensions();
|
||||
vector<Engine_Extension*> m_Eng_exts;
|
||||
|
||||
ofstream file_et, file_ht; //excite signal dump file
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue