Skip to content

Why doesn't set_stopped allow a value to be passed like set_value/set_error? #1019

Answered by maikel
bnbajwa asked this question in Q&A
Discussion options

You must be logged in to vote

Does your sender complete when the whole multi-shot operation completes? In my understanding, you would complete with set_stopped() when an outer cancelation request happens. I would write an algorithm that completes with some "partial sum" result when the multi-shot op has stopped or needs to be rescheduled.

If you need to expose each single read operation, using something like a sequence-sender might be more appropriate.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@maikel
Comment options

@bnbajwa
Comment options

@maikel
Comment options

Answer selected by bnbajwa
Comment options

You must be logged in to vote
1 reply
@bnbajwa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants