takeNext method
Function that returns the next job in queue.
Always check hasNext before running this function, as this function has no guarantee that it will not throw exception if no items are in queue.
Implementation
@override
BackpressureConfiguration<Q, R> takeNext() {
final toReturn = queue!;
queue = null;
return toReturn;
}