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
Promise uses PromiseState as its output for both sync and async usage.
Because of the many ways a request could become unable to deliver, there are several more variants than a user might expect. We should consider ways to simplify this so users aren't left scratching their heads over how to handle variants that they can't receive anyway.
We return PromiseState as the output of .await, but it contains a Pending variant which can't be the case after .await is finished.
We use Promise as the output of Channel::command, but that method will never result in a Cancellation and shouldn't realistically result in a Disposed either.
Taken is a variant we need to have because we store the result in the Promise, and a user can take it without dropping the promise. The existence of this variant might confuse users because they don't know what to do if they get it.
The text was updated successfully, but these errors were encountered:
Before proceeding, is there an existing issue or discussion for this?
Description
Promise uses PromiseState as its output for both sync and async usage.
Because of the many ways a request could become unable to deliver, there are several more variants than a user might expect. We should consider ways to simplify this so users aren't left scratching their heads over how to handle variants that they can't receive anyway.
.await
, but it contains a Pending variant which can't be the case after.await
is finished.Channel::command
, but that method will never result in a Cancellation and shouldn't realistically result in a Disposed either.Taken
is a variant we need to have because we store the result in the Promise, and a user can take it without dropping the promise. The existence of this variant might confuse users because they don't know what to do if they get it.The text was updated successfully, but these errors were encountered: