common: Introduce a generic BufferedBlockingQueue
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Tue, 21 Apr 2015 02:08:05 +0000 (22:08 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 1 May 2015 20:36:06 +0000 (16:36 -0400)
commit6d758ba0fc7404ef6a0c390a29cad86eb730bc7c
treed39012f9ed9b1bf7b262295291b080d2316a3171
parent98754b9b371df050c0aeb4acbe58f6986222f5a4
common: Introduce a generic BufferedBlockingQueue

The BufferedBlockingQueue (nicknamed "BBQ") is a wrapper around
a standard ArrayBlockingQueue, which accumulates elements in a
separate Collection before putting them in the actual Queue.
This allows a producing and a consuming threads to not block each
other as much when they are producing and consuming at the same
time.

An identified use case is the ThreadedHistoryTreeProvider, and
perhaps eventually the AbstractTmfStateProvider too.

Change-Id: I010547d7914c4c377bf1c85f4f830bff0aa8740f
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/46148
Reviewed-by: Hudson CI
org.eclipse.tracecompass.common.core/META-INF/MANIFEST.MF
org.eclipse.tracecompass.common.core/src/org/eclipse/tracecompass/common/core/collect/BufferedBlockingQueue.java [new file with mode: 0644]
org.eclipse.tracecompass.common.core/src/org/eclipse/tracecompass/common/core/collect/package-info.java [new file with mode: 0644]
This page took 0.02975 seconds and 5 git commands to generate.