Bug 473441: Fix concurrency issue in ThreadedHistoryTreeBackend
We add a blockingPeek() method to the BBQ, which allows blocking
on the queue without removing elements from it. This allows
iterating threads doing query to continue seeing the element
while it is being inserted.
The implementation is changed so that the output buffer remains in the
inner queue until it is empty. Only then is it removed from the inner
queue and the next head of the queue becomes the output buffer.
The iterator is fixed to be a true descending iterator without
duplications and that properly handles concurrent modification of the
inner queue.
The size() method is added.
Change-Id: I9e708824748a625010aded82a3198f096c1fc427
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/52640
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
This page took 0.026359 seconds and 5 git commands to generate.