We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d34c754 commit f70bf0eCopy full SHA for f70bf0e
lib/base/io-engine.cpp
@@ -34,13 +34,6 @@ CpuBoundWork::CpuBoundWork(boost::asio::yield_context yc)
34
}
35
36
37
-CpuBoundWork::~CpuBoundWork()
38
-{
39
- if (!m_Done) {
40
- IoEngine::Get().m_CpuBoundSemaphore.fetch_add(1);
41
- }
42
-}
43
-
44
void CpuBoundWork::Done()
45
{
46
if (!m_Done) {
lib/base/io-engine.hpp
@@ -35,7 +35,11 @@ class CpuBoundWork
CpuBoundWork(CpuBoundWork&&) = delete;
CpuBoundWork& operator=(const CpuBoundWork&) = delete;
CpuBoundWork& operator=(CpuBoundWork&&) = delete;
- ~CpuBoundWork();
+
+ inline ~CpuBoundWork()
+ {
+ Done();
+ }
void Done();
0 commit comments