Merge pull request #205 from timotheecour/dev
Use core.atomic.atomicOp to mutate shared variables
This commit is contained in:
commit
732bb8f8ec
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue