mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
CpuBoundWork#~CpuBoundWork(): just call #Done() to deduplicate code
This commit is contained in:
parent
eb4e601eaf
commit
9018385c1a
@ -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) {
|
||||||
|
@ -42,7 +42,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