diff --git a/Lib/d/dhead.swg b/Lib/d/dhead.swg index 7a2f4fddc..9f950c60f 100644 --- a/Lib/d/dhead.swg +++ b/Lib/d/dhead.swg @@ -227,7 +227,8 @@ public: m_sPendingException = e; synchronized { - ++m_sPendingCount; + import core.atomic; + core.atomic.atomicOp!"+="(m_sPendingCount, 1); } } @@ -238,7 +239,8 @@ public: e = m_sPendingException; m_sPendingException = null; synchronized { - --m_sPendingCount; + import core.atomic; + core.atomic.atomicOp!"-="(m_sPendingCount, 1); } } }