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
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.
The text was updated successfully, but these errors were encountered:
kdubb
changed the title
Refactor Future into protocol to allow restricting fulfillment
Refactor Future into protocol(s) to allow restricting fulfillment
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
orStdFuture
) and would simply implement both protocols.The text was updated successfully, but these errors were encountered: