private void submitIfAvailable() {
if (sawEof || running != null || available.isEmpty()) {
return;
}
// acquires an available buffer for reading next page, and submit the task
DataBuffer buffer = available.removeFirst();
Task task = new Task(input, buffer, positionInBlock, currentBlock, blockRest);
running = executor.submit(task);
}