Add ability to specify wait time to QueueInputStream#452
Merged
garydgregory merged 2 commits intoapache:masterfrom Apr 22, 2023
maxxedev:QueueInputStream-wait-timeout
Merged
Add ability to specify wait time to QueueInputStream#452garydgregory merged 2 commits intoapache:masterfrom maxxedev:QueueInputStream-wait-timeout
garydgregory merged 2 commits intoapache:masterfrom
maxxedev:QueueInputStream-wait-timeout
Conversation
Member
|
@maxxedev I merged it and updated the code to use a builder instead of adding yet another constructor (see the rest of the code base). What feels odd is that |
Contributor
Author
|
Thanks for quick review and merge. Good suggestion about nanos. I did not notice that |
Contributor
Author
|
Is a changes.xml entry needed? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think this will keep the API simple yet offer the roughly the same (or even more) functionality the reverted change.
- PollingQueueInputStream is same as
new QueueInputStream()which has timeout=0- TakingQueueInputStream is same as
new QueueInputStream(..., Duration.ofMillis(Long.MAX_VALUE))and users can also specify arbitrary queue read timeout between 0 and LONG_MAX
see also https://github.com/apache/commons-io/pull/447