/** * Thread pool operation that fills the read-ahead queue */ @Override public void run() { final DecompressedBlock decompressed = processNextBlock(freeBuffers.poll()); if (!mResult.offer(decompressed)) { // offer should never block since we never queue a task when the results buffer is full running.release(); // safety release to ensure foreground close() does not block indefinitely throw new IllegalStateException("Decompression buffer full"); } tryQueueTask(); } }
/** * Thread pool operation that fills the read-ahead queue */ @Override public void run() { final DecompressedBlock decompressed = processNextBlock(freeBuffers.poll()); if (!mResult.offer(decompressed)) { // offer should never block since we never queue a task when the results buffer is full running.release(); // safety release to ensure foreground close() does not block indefinitely throw new IllegalStateException("Decompression buffer full"); } tryQueueTask(); } }