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

Refactor Future into protocol(s) to allow restricting fulfillment #25

Open
kdubb opened this issue Sep 29, 2023 · 0 comments
Open

Refactor Future into protocol(s) to allow restricting fulfillment #25

kdubb opened this issue Sep 29, 2023 · 0 comments

Comments

@kdubb
Copy link

kdubb commented Sep 29, 2023

Currently Future is an all in one that allows interrogating results and fulfilling the future as well. This disallows restricting fulfillment by consumers.

Refactoring Future into a protocol that only allows interrogation and a sub-protocol, FulfillableFuture, that adds fulfillment capabilities would allow choosing which capabilities to expose to consumers.

The current Future implementation would need to be renamed (e.g. AsyncFuture or StdFuture) and would simply implement both protocols.

@kdubb kdubb changed the title Refactor Future into protocol to allow restricting fulfillment Refactor Future into protocol(s) to allow restricting fulfillment Sep 29, 2023
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

No branches or pull requests

1 participant