2 May
2014
2 May
'14
11:28 a.m.
// 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