-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
Wrong javadoc, Promise::tryComplete never throws IllegalStateException #2095
Comments
It seems it can throw
|
@nfekete |
That's right - it may throw. However, maybe it is an implementation detail and we should fix the API spec for 1.0. I will keep the ticket open. |
@danieldietrich can you enlighten me on how would |
@mxj4 it can't throw, otherwise the Future invariant does not hold and a bug is revealed. It never threw so far (nor it will). It should not be part of the public API and wil be removed in 1.0. |
@danieldietrich It's still useful in some cases. Currently I use ScheduledExecutorService with it to implement timeout for vavr Future. |
@mx4j thanks for the feedback |
Fixed that in #2093 - see also this description |
vavr/vavr/src/main/java/io/vavr/concurrent/Promise.java
Line 241 in 22ac105
The text was updated successfully, but these errors were encountered: