You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Lazy future transforms are not called if the future is already completed #68
All this does is add it to the list of next futures to complete once we have a result.
What if we already have a result? The newly added futures will never be completed.
So in this method, we need to atomically check if the future is already completed, and in that case just complete the passed in future immediately, synchronously. Otherwise, add it to next.
Activity
dcrissman commentedon Nov 9, 2016
Is this because
if (isDone()) return;happens first in the complete methods on LazyTransformingFuture and LazyTransformableFuture?alechenninger commentedon Nov 12, 2016
No, if you look here:
All this does is add it to the list of next futures to complete once we have a result.
What if we already have a result? The newly added futures will never be completed.
So in this method, we need to atomically check if the future is already completed, and in that case just complete the passed in future immediately, synchronously. Otherwise, add it to next.