discussion: cancellation of actions
See original GitHub issueRight now actions cannot be cancelled - once called they’re expected to either finish executing or return an error. Sometimes when one piece of a chain halts, there’s no point in continuing the other, already started pieces. This is part of the design in pull-stream. At this point choo
’s actions have no concept of cancellation, so I’d like to start a bit of discussion about this:
- do we need a cancellation mechanism between actions?
- what are the use cases for cancellation?
- what prior art is there around this?
- (how) do the browser protocols handle cancellations (HTTP / WS / SSE / WebRTC)?
This is probably for more advanced use cases; but giving it some thought would definitely be worth it I reckon. Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Meeting Cancellation Emails: How to Write One [+Examples]
Learn how to reschedule meetings ASAP if you have a scheduling conflict or if you're feeling sick. Plus, see examples.
Read more >How to Have the Termination Discussion - SHRM
Termination meetings are always challenging. Minutes before you call the employee into your office, your heart pounds; you experience mixed ...
Read more >How to Write a Polite Meeting Cancellation Email
1. It is better to dedicate some time and write it yourself, or at least from your own email address. 2. When terminating...
Read more >What is cancel culture? Why we keep fighting about ... - Vox
Within the turbulent past few years, the idea that a person can be “canceled” — in other words, culturally blocked from having a...
Read more >What Is Cancel Culture, and Does It Change Things for the ...
Four students engaging in a class discussion ... Use these lesson activities to help your students think deeply about the impact of cancel...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve been wondering about this a bit more lately. Do we truly need cancellation? Something we should ask ourselves is what use case it would support.
The way I’m viewing
actions
now is as immutable commands that either ACK or NACK - they’re a bit expensive to send but that’s cool. Because they’re expensive to send, they shouldn’t be used to stream data from. When streaming data it’d be recommended to buffer instead (even tiny buffers) rather than send a flood ofactions
. Because of this, it doesn’t make sense to also have cancellation in there.As a tl:dr; cancellation adds technical cost, can’t really think of a scenario where I’d use it and
send()
is not great for streaming anywayAh right, from discussion on IRC with @toddself and @timwis we decided it’s probs not wise to move to
pull-stream
because the default experience forchoo
would be… not great.Instead what we might do is supporting cancellation in the existing API by (wait for it) adding yet another callback! 🎉 - but this one would be totes optional, and we’d like never use it in any of the examples. It’s only there so that if someone wants to upgrade to an async flow that supports cancellation it’s possible. Wouldn’t that be sweet? 😁
So yeah, minor patch possible for this I reckon - keeps the upgrade flow nice and smooth 🆒