p26001-store-acs-soc-fw-app/util/Subsystem.cpp
2026-09-28 21:33:04 +08:00

35 lines
788 B
C++

/*
*******************************************************************************
* INCLUDES
*******************************************************************************
*/
#include "Subsystem.h"
namespace Util
{
/*
*******************************************************************************
* CLASS DEFINE
*******************************************************************************
*/
Subsystem::Subsystem(int maxCapacity): _threadPool(2, 16, 60, 0), _taskManager(_threadPool)
{
}
void Subsystem::run(Service* pService)
{
_taskManager.start(pService);
}
void Subsystem::stopAll()
{
_taskManager.cancelAll();
_taskManager.joinAll();
}
void Subsystem::uninitialize()
{
stopAll();
}
}