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
poll-promise panics if the user drops the Sender before sending a value.
This is quite a footgun.
A dropped sender is a bug (because we cannot deliver a value), but I'm not sure it deserves a crash.
We could change the interface of Promise to return a Result, with an error for "DroppedSender".
We could also consider having the panic only in debug builds, and in release builds treat a dropped receiver the same as a receiver that hasn't sent anything yet, i.e. the promise will be stuck in "Pending" forever. Perhaps with a logged warning.
The text was updated successfully, but these errors were encountered:
poll-promise
panics if the user drops theSender
before sending a value.This is quite a footgun.
A dropped sender is a bug (because we cannot deliver a value), but I'm not sure it deserves a crash.
We could change the interface of
Promise
to return a Result, with an error for "DroppedSender".We could also consider having the panic only in debug builds, and in release builds treat a dropped receiver the same as a receiver that hasn't sent anything yet, i.e. the promise will be stuck in "Pending" forever. Perhaps with a logged warning.
The text was updated successfully, but these errors were encountered: