public class UnboundedTaskQueue extends AbstractBlockingTaskQueue
BoundedTaskQueueis an unordered, unbounded implementation of a
TaskQueue. This implementation is
ThreadSafe, as it can safely handle multiple consumer and producer threads writing and/or reading from it.
|Constructor and Description|
|Modifier and Type||Method and Description|
Adds an element to the head of the queue.
public void enqueue(Task<? extends Object> task) throws InterruptedException
Threadis blocked until capacity in the queue has been released.
Copyright © 2020. All rights reserved.