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
With Senders there are 3 termination points: natural completion, completion due to cancellation and error. assumeOk only counts natural completion as correct, and errors out on the other 2.
DoneSender is a bit of a misnomer I guess, CancelSender would have been a bit better.
onDone should probably also be called onCancel then I think?
Its actually called setDone. Emphasize on completion.
One thing about cancellation is that in terms of lifecycle its important to know when the cancellation is done. Its only when it is done that resources can be cleaned.
Senders signal completion, so the setValue, setDone, setError trifecta actually makes sense. And contrary to what I said yesterday, that makes DoneSender actually the more correct naming.
Sorry, the concurrency stuff has moved to the back of my mind a bit.
concurrency/tests/ut/concurrency/sender.d
Line 21 in 7dd10ad
I don't get why this test code passes -
DoneSender
should just make the task finish without value, whileThrowingSender
makes it error/abort.Why does the test check for
assumeOk.shouldThrow
throw likeThrowingSender
?The text was updated successfully, but these errors were encountered: