Bug 4756 – core.atomic should have atomicOp!"="

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-08-29T08:47:00Z
Last change time
2011-08-12T20:36:31Z
Assigned to
sean
Creator
dsimcha

Comments

Comment #0 by dsimcha — 2010-08-29T08:47:38Z
This is technically an enhancement, but it severely limits the usability of core.atomic and seems like a pretty silly omission. The following code needs to work: int num = 1; atomicOp!"="(num, 2); // Atomically set num to 2.
Comment #1 by dsimcha — 2011-08-12T20:36:31Z
Resolved by exposing atomic store.