Skip to content

Rework extension point for checking for already-completed futures #155

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

Merged
merged 1 commit into from
Sep 7, 2016

Conversation

retronym
Copy link
Member

@retronym retronym commented Mar 3, 2016

The current extension point assumes that if a future is in the
completed state, a subsequent call to get the already completed
value will succeed. While this assumption holds for
scala.concurrent.Future, it might not hold for a future system
that has semantics like a weak reference.

This commit uses a single call getCompleted to query the state
and get the already completed value. This returns null if the
value is not available.

The current extension point assumes that if a future is in the
completed state, a subsequent call to get the already completed
value will succeed. While this assumption holds for
scala.concurrent.Future, it might not hold for a future system
that has semantics like a weak reference.

This commit uses a single call `getCompleted` to query the state
and get the already completed value. This returns null if the
value is not available.
@retronym retronym merged commit ea6afc0 into scala:master Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant