digitalmars.D.learn - Non-atomic ops allowed on shared variables?
- Andrej Mitrovic (13/13) Dec 03 2011 I thought this wasn't allowed:
I thought this wasn't allowed:
shared uint threadsCount;
void bumpThreadsCount()
{
++threadsCount;
}
void main()
{
}
According to TDPL it should error and we should use atomicOp from
std.concurrency instead. atomicOp is what I've used so far if I had to
use shared variables. Has ++ suddenly become atomic automatically or
is this a bug?
Dec 03 2011








Andrej Mitrovic <andrej.mitrovich gmail.com>