Opened 9 years ago
Closed 8 years ago
#9527 closed Bugs (fixed)
Typo on Boost::Atomic docs
Reported by: | Owned by: | timblechmann | |
---|---|---|---|
Milestone: | To Be Determined | Component: | atomic |
Version: | Boost 1.54.0 | Severity: | Cosmetic |
Keywords: | Cc: |
Description
On http://www.boost.org/doc/libs/1_55_0/doc/html/atomic/thread_coordination.html
In paragraph 'One can however also arrive at the same conclusion using happens-before: Either thread1 or thread2 will succeed first at m.lock(). If this is be thread1, then as a consequence, thread2 cannot succeed at m.lock() before thread1 has executed m.unlock(), consequently A happens-before B in this case. By symmetry, if thread2 succeeds at m.unlock() first, we can conclude B happens-before A."
In the last sentence, that should probably be "... if thread2 succeeds at m.lock() first, ...". That is, change "unlock" to "lock".
Fixed in https://github.com/boostorg/atomic/commit/7fcb3b18b0e6128f134daf508214a802b5b387e7. Thanks.