[Boost.Atomic] Wait-free multi-producer queue example bug?
16 May
2013
16 May
'13
9:20 p.m.
Hi, In http://www.boost.org/doc/libs/1_53_0/doc/html/atomic/usage_examples.html#boo... I see that pop_all_reverse() is implemented as: node * pop_all_reverse(void) { return head_.exchange(0, boost::memory_order_consume); } Shouldn't the memory order be memory_order_acquire in this example? If I'm not mistaken, at least an acquire is required to see all the writes from the thread that did the release. GCC 4.8 also complains that memory_order_consume is not a correct memory ordering for exchange. Thanks
4196
Age (days ago)
4196
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ioannis Papadopoulos