35 lines
788 B
C++
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();
|
|
}
|
|
|
|
}
|