-
Notifications
You must be signed in to change notification settings - Fork 1.6k
AbstractListenableFuture#addListener does not execute listener when the listener is added after the future completion and when the execution list is not yet initialized #1128
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
Comments
For instance, I do not see a fix that does not imply to add an |
Yep. It seems I broker it when I tried to lazy load the Thanks for reporting. |
Thanks for this fix. If I understand correctly the fix, just before the completion, more than one threads can execute concurrently the methods
Does it look like an issue for you? |
Runnables will be processed only once, as they're stored in a |
I agree with your first statement. My comment is about your second statement, maybe updating the javadoc could help to understand this side effect? I wonder if Another way: the Whatever thanks for this fix. 👍 |
Not sure. And I'd rather avoid changing things here as this class is a fork from Guava. |
You could find below two test cases to add to
org.asynchttpclient.ListenableFutureTest
:ListenableFutureTest#testListenableFutureAfterCompletion
with the issue when the listener is added after the completionListenableFutureTest#testListenableFutureBeforeAndAfterCompletion
without the issue because the execution list is initialized prior the future completionThe text was updated successfully, but these errors were encountered: