$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [thread] shared_spinlock_t idea or faster shared_lock
From: Tim Blechmann (tim_at_[hidden])
Date: 2014-05-02 07:28:57
>> // we have set the writer bit, now waiting for readers to finish
>> while (state_.readers_count) ; // busy loop, can we do better?
>
> Run the busy loop a limited number of times before adding a yield or sleep instruction, then repeat.
on intel CPUs, one should use a PAUSE instruction as in _mm_pause()
inside the busy loop ...
tim