Commit 6cf60d85 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Change to bool indicating busy state

parent ed654d2f
......@@ -146,7 +146,7 @@ namespace ITA
///
/// We need this to later reference the task when creating the result.
///
ITAAtomicPtr<CSimulationTask> m_pCurrentTask = nullptr;
std::unique_ptr<CSimulationTask> m_pCurrentTask;
///
/// \{
......@@ -159,6 +159,9 @@ namespace ITA
ITAAtomicBool m_bResetIndicated = false;
/// \}
//! \brief Indicates whether worker is busy or not
ITAAtomicBool m_bBusy = false;
#ifdef WITH_PROFILER
static std::size_t iWorkerMaxID;
#endif
......
......@@ -82,7 +82,8 @@ namespace ITA
assert ( m_eFieldOfDuty == pTask->eSimulationType );
// Assume ownership of the task.
m_pCurrentTask = pTask.release ( );
m_pCurrentTask = std::move(pTask);
m_bBusy = true;
// Stop if reset is running.
if ( m_bResetIndicated )
......@@ -93,6 +94,8 @@ namespace ITA
m_pCurrentTask = nullptr;
m_bBusy = false;
return;
}
......@@ -202,6 +205,8 @@ namespace ITA
// release the current task
m_pCurrentTask = nullptr;
m_bBusy = false;
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment