On 2015-10-22 02:57, Giovanni Piero Deretta wrote:
On 22 Oct 2015 3:26 a.m.,
wrote: The yield can be removed without any ill effect except in cases of
over-subscription. Without the yield performance is *very* poor because the thread is forced to wait for other threads that aren't even running (lines 355 & 378)... Basically the yield is only a work-around for something that is undesirable anyway (over-subsciption), but it limits the 'damage' in those scenarios.
It seems to me then it is not really lock free then, right?
That is an interesting viewpoint, and in the perspective of over subscription I suppose you have a point in a certain sense. All writers allowed to enter push or readers allowed to enter pop can do all their work in parallel except to increase the trailing edge (write/read position essentially). Each writer (and symmetrically reader)has to wait for the writer before it before increasing the queue size (and allowing a reader).