整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
35
util/Subsystem.cpp
Normal file
35
util/Subsystem.cpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* 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();
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue