diff --git a/PTN_Engine/Executor/JobQueueExecutor.cpp b/PTN_Engine/Executor/JobQueueExecutor.cpp index 091a8fc..51ddaec 100644 --- a/PTN_Engine/Executor/JobQueueExecutor.cpp +++ b/PTN_Engine/Executor/JobQueueExecutor.cpp @@ -32,7 +32,7 @@ void JobQueueExecutor::executeAction(const ActionFunction &action, atomicaddJob(f); + m_jobQueue.addJob(f); } } // namespace ptne diff --git a/PTN_Engine/Executor/JobQueueExecutor.h b/PTN_Engine/Executor/JobQueueExecutor.h index 8ddce70..36b451c 100644 --- a/PTN_Engine/Executor/JobQueueExecutor.h +++ b/PTN_Engine/Executor/JobQueueExecutor.h @@ -31,7 +31,7 @@ class JobQueueExecutor : public IActionsExecutor private: //! Job queue to dispatch actions. - std::unique_ptr m_jobQueue = std::make_unique(); + JobQueue m_jobQueue; }; } // namespace ptne diff --git a/PTN_Engine/PTN_EngineImp.cpp b/PTN_Engine/PTN_EngineImp.cpp index 1b80701..f4429b1 100755 --- a/PTN_Engine/PTN_EngineImp.cpp +++ b/PTN_Engine/PTN_EngineImp.cpp @@ -20,7 +20,6 @@ #include "PTN_Engine/PTN_EngineImp.h" #include "PTN_Engine/Executor/ActionsExecutorFactory.h" -#include "PTN_Engine/JobQueue/JobQueue.h" #include "PTN_Engine/Utilities/LockWeakPtr.h" #include @@ -31,8 +30,8 @@ using enum PTN_Engine::ACTIONS_THREAD_OPTION; PTN_EngineImp::PTN_EngineImp(PTN_Engine::ACTIONS_THREAD_OPTION actionsThreadOption) : m_actionsThreadOption(actionsThreadOption) -, m_eventLoop(*this) , m_actionsExecutor(ActionsExecutorFactory::createExecutor(actionsThreadOption)) +, m_eventLoop(*this) { } diff --git a/PTN_Engine/PTN_EngineImp.h b/PTN_Engine/PTN_EngineImp.h index ea44340..143a4b9 100755 --- a/PTN_Engine/PTN_EngineImp.h +++ b/PTN_Engine/PTN_EngineImp.h @@ -208,9 +208,6 @@ class PTN_EngineImp final : public IPTN_EngineEL //! Loop that processes events and executes the Petri net. EventLoop m_eventLoop; - //! Job queue to dispatch actions. - std::unique_ptr m_jobQueue; - //! Flag reporting a new input event. std::atomic m_newInputReceived = false;