$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [spinlock] Spin on volatile read, NUMA fairness?
From: Peter Dimov (lists_at_[hidden])
Date: 2014-12-04 07:45:52
Gavin Lambert wrote:
> Out of curiosity, while I agree that the latter is better than the former,
> how would this compare:
>
> while( f_.exchange( true, std::memory_order_acquire ) )
> {
> while( f_.load( std::memory_order_relaxed ) )
> {
> /* maybe yield */
> }
> }
I think that you're right, this should indeed be better.