-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add Cancellable utility method #34
Conversation
484a92f
to
bda0e5e
Compare
bda0e5e
to
8ba46db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
9d5a04a
to
a260e63
Compare
0084084
to
7950275
Compare
So I just submitted the changes so that we use the future as a delegate and I changed Not sure if you want the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
*/ | ||
@throws[CancellationException] | ||
def cancel(): Unit | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer API 👍
(Since the impl is package private the delegate method won't be publicly accessible) |
Ah yes forgot about that. |
Adds a best effort
Cancellable
utility method for being able to cancel underlyingFuture
's. Also adds a basic unit spec to test this functionality.