core.atomic should provide a way to do perform unary atomic operations on variables to the greatest extent practical. The obvious candidates are:
atomicOp!"++"(var);
atomicOp!"--"(var);
Comment #1 by code — 2015-03-30T20:40:37Z
*** This issue has been marked as a duplicate of issue 12891 ***