Closed
Bug 1407137
Opened 7 years ago
Closed 7 years ago
mozilla::Swap(Atomic<T, Order>&, Atomic<T, Order>&) = delete;
Categories
(Core :: MFBT, enhancement, P3)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: Waldo, Assigned: Waldo)
Details
Attachments
(1 file)
639 bytes,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
A comment in bug 1406041 posed the idea of swapping two Atomic<T>, only to strike the idea as insufficiently explicit. Which is good reasoning -- not least because Swap(Atomic<T>&, Atomic<T>&) uses the default definition of Swap which *won't* actually be atomic. Seems like we should Swap(Atomic<T>&, Atomic<T>&) = delete to remove a footgun. (Making the exchange only occur by explicitly calling an atomic operation seems preferable to defining an overload, as the other conceivable alternative decision.)
Attachment #8916882 -
Flags: review?(nfroyd)
Comment 1•7 years ago
|
||
Comment on attachment 8916882 [details] [diff] [review] Patch Review of attachment 8916882 [details] [diff] [review]: ----------------------------------------------------------------- Makes sense to me.
Attachment #8916882 -
Flags: review?(nfroyd) → review+
Pushed by jwalden@mit.edu: https://hg.mozilla.org/integration/mozilla-inbound/rev/a993d7bc6658 Implement Swap(Atomic<T, Order>&, Atomic<T, Order>&) = delete; to remove an actually-non-atomic footgun. r=froydnj
Comment 3•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a993d7bc6658
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•