Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Timeout.NONE for plain streams to avoid throwing InterruptedIOExcept... #77

Closed
wants to merge 1 commit into from
Closed

Use Timeout.NONE for plain streams to avoid throwing InterruptedIOExcept... #77

wants to merge 1 commit into from

Conversation

dhpiggott
Copy link

...ion

The default Timeout implementation throws InterruptedIOException from
throwIfReached when the current thread is interrupted.

This closes #76.

…eption

The default Timeout implementation throws InterruptedIOException from
throwIfReached when the current thread is interrupted.
@swankjesse
Copy link
Member

I don't think it makes sense to permit user-defined timeouts on streams. Thread interruption isn't a scalpel; it's a cleaver! If you use it you don't get precision on where its detected or used.

(There are many many other APIs with similar, unconfigurable behavior; all of java.until.concurrent is one example.)

@swankjesse swankjesse closed this Oct 8, 2014
@dhpiggott dhpiggott deleted the uninterruptable-streams branch October 9, 2014 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

source(inputStream) and sink(outputStream) make the streams interruptable
2 participants