@@ -0,0 +1,1906 @@
+package arez;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0Aimport java.util.Objects;%0Aimport java.util.stream.Stream;%0Aimport javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0Aimport static org.realityforge.braincheck.Guards.*;%0A%0A/**%0A * A very simple first-in first out task queue.%0A */%0Afinal class FifoTaskQueue%0A  implements TaskQueue%0A%7B%0A  /**%0A   * The default number of slots in queue.%0A   */%0A  private static final int DEFAULT_QUEUE_SIZE = 100;%0A  /**%0A   * A buffer per priority containing tasks that have been scheduled but are not executing.%0A   */%0A  @Nonnull%0A  private final CircularBuffer%3CObserver%3E _taskQueue;%0A%0A  FifoTaskQueue()%0A  %7B%0A    this( DEFAULT_QUEUE_SIZE );%0A  %7D%0A%0A  FifoTaskQueue( final int queueSize )%0A  %7B%0A    _taskQueue = new CircularBuffer%3C%3E( queueSize );%0A  %7D%0A%0A  @Override%0A  public int getQueueSize()%0A  %7B%0A    return _taskQueue.size();%0A  %7D%0A%0A  /**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Override%0A  public boolean hasTasks()%0A  %7B%0A    return !_taskQueue.isEmpty();%0A  %7D%0A%0A  /**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Override%0A  public void queueTask( @Nonnull final Observer task )%0A  %7B%0A    if ( Arez.shouldCheckInvariants() )%0A    %7B%0A      invariant( () -%3E !_taskQueue.contains( task ),%0A                 () -%3E %22Arez-0089: Attempting to schedule task named '%22 + task.getName() +%0A                       %22' when task is already in queue.%22 );%0A    %7D%0A    _taskQueue.add( Objects.requireNonNull( task ) );%0A  %7D%0A%0A  /**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Nullable%0A  @Override%0A  public Observer dequeueTask()%0A  %7B%0A    return _taskQueue.pop();%0A  %7D%0A%0A  /**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Override%0A  public Collection%3CObserver%3E clear()%0A  %7B%0A    final ArrayList%3CObserver%3E tasks = new ArrayList%3C%3E();%0A    _taskQueue.stream().forEach( tasks::add );%0A    _taskQueue.clear();%0A    return tasks;%0A  %7D%0A%0A  /**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Nonnull%0A  @Override%0A  public Stream%3CObserver%3E getOrderedTasks()%0A  %7B%0A    return _taskQueue.stream();%0A  %7D%0A%7D%0A

Add another TaskQueue implementation