mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-25 18:48:50 +02:00
CpuBoundWork#~CpuBoundWork(): just call #Done() to deduplicate code
This commit is contained in:
parent
2cb282eb9d
commit
52d53ec1ba
@ -34,13 +34,6 @@ CpuBoundWork::CpuBoundWork(boost::asio::yield_context yc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CpuBoundWork::~CpuBoundWork()
|
|
||||||
{
|
|
||||||
if (!m_Done) {
|
|
||||||
IoEngine::Get().m_CpuBoundSemaphore.fetch_add(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CpuBoundWork::Done()
|
void CpuBoundWork::Done()
|
||||||
{
|
{
|
||||||
if (!m_Done) {
|
if (!m_Done) {
|
||||||
|
@ -35,7 +35,11 @@ public:
|
|||||||
CpuBoundWork(CpuBoundWork&&) = delete;
|
CpuBoundWork(CpuBoundWork&&) = delete;
|
||||||
CpuBoundWork& operator=(const CpuBoundWork&) = delete;
|
CpuBoundWork& operator=(const CpuBoundWork&) = delete;
|
||||||
CpuBoundWork& operator=(CpuBoundWork&&) = delete;
|
CpuBoundWork& operator=(CpuBoundWork&&) = delete;
|
||||||
~CpuBoundWork();
|
|
||||||
|
inline ~CpuBoundWork()
|
||||||
|
{
|
||||||
|
Done();
|
||||||
|
}
|
||||||
|
|
||||||
void Done();
|
void Done();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user