3 ms·
I’m in general agreement that Rx is, in practice, not an improvement over most other approaches. But: > How do I cancel this stuff Everyone I’ve ever heard d
by mercutio2 8y ago
I’m in general agreement that Rx is, in practice, not an improvement over most other approaches.
But:
> How do I cancel this stuff
Everyone I’ve ever heard describe Reactive pipelines describes built-in, standardized cancel behavior as the raison d'être for Rx!
It’s super common to encounter a one off someone thought would never get called more than once in a while, which actually piles up a huge serial queue (or worse, creates dozens of threads while concurrently contending for a resource that’s serialized in a less than perfectly transparent way).
So in those cases, knowing all your interfaces explicitly include a cancellation token is pretty appealing.
Of course, in practice, lot’s of people don’t bother to wire together the cancellation bits, so you’re left thinking you can cancel things but it doesn’t actually do anything. So maybe that’s what you meant...
- aaaaaaaaaab 8y agoNot sure about the cancellation token bit. Last time I’ve used Rx my experience was that you could never know whether disposing a subscription would cancel the underlying process or not. Many times I wanted the opposite behaviour to what the original author had implemented. Not to mention cases where I wanted to keep a process alive as long as there’s at least one subscriber, but cancel it when there’s none left... Maybe things have changed since then (2016-2017) with regards to cancellation; but I’m off the Rx train for a while.