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

Issue #2552 Skip Executing Actions if the Future is cancelled. #2608

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

charvakcpatel007
Copy link

@charvakcpatel007 charvakcpatel007 commented Jul 27, 2020

Fixes #2552

Copy link
Contributor

@danieldietrich danieldietrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thank you for the PR. The implementation looks good to me!

It is a good sign that the unit tests still run ;)
But we need at least one additional unit test in FutureTest that covers the issue #2552. Ideally, you take the example the reporter gave and make a test out of it. Sometimes it is hard to test concurrency. Please take a look at the other tests. If you need help please give me a sign and I will assist you!

Thanks!
Daniel

@@ -376,6 +376,9 @@ boolean tryComplete(Try<? extends T> value) {
if (waiters != null) {
waiters.forEach(this::unlock);
}
if(isCancelled()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I don't want to be a nitpicker but you missed one space if(is... --> if (is...)

@theqp
Copy link
Contributor

theqp commented Aug 24, 2020

@charvakcpatel007 add the missed space to this branch so it can be merged.

@pivovarit
Copy link
Member

Better late than ever - this change is looking good, but we still need a test that proves that the new functionality works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chained futures keep executing although future was cancelled
4 participants