You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2024/02/05 17:55:46 UTC
(tika) 01/01: TIKA-4189 -- CallablePipesIterator should wait for timeoutMillis when trying to offer the final semaphore
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch TIKA-4189
in repository https://gitbox.apache.org/repos/asf/tika.git
commit c45caf4381fde5d3e88f9760d81f1f5b0d142c73
Author: tallison <ta...@apache.org>
AuthorDate: Mon Feb 5 12:55:32 2024 -0500
TIKA-4189 -- CallablePipesIterator should wait for timeoutMillis when trying to offer the final semaphore
---
.../org/apache/tika/pipes/pipesiterator/CallablePipesIterator.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tika-core/src/main/java/org/apache/tika/pipes/pipesiterator/CallablePipesIterator.java b/tika-core/src/main/java/org/apache/tika/pipes/pipesiterator/CallablePipesIterator.java
index 6bde42ba0..a60784f0c 100644
--- a/tika-core/src/main/java/org/apache/tika/pipes/pipesiterator/CallablePipesIterator.java
+++ b/tika-core/src/main/java/org/apache/tika/pipes/pipesiterator/CallablePipesIterator.java
@@ -97,9 +97,11 @@ public class CallablePipesIterator implements Callable<Long> {
added++;
}
for (int i = 0; i < numConsumers; i++) {
- boolean offered = queue.offer(PipesIterator.COMPLETED_SEMAPHORE);
+ boolean offered = queue.offer(PipesIterator.COMPLETED_SEMAPHORE, timeoutMillis,
+ TimeUnit.MILLISECONDS);
if (!offered) {
- throw new TimeoutException("timed out trying to offer tuple");
+ throw new TimeoutException("timed out trying to offer the completed " +
+ "semaphore");
}
}
} else {