-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cancellation capabilities to IO #983
Conversation
Codecov Report
@@ Coverage Diff @@
## master #983 +/- ##
============================================
+ Coverage 46.99% 47.04% +0.05%
- Complexity 672 680 +8
============================================
Files 313 315 +2
Lines 8071 8090 +19
Branches 822 826 +4
============================================
+ Hits 3793 3806 +13
- Misses 3950 3954 +4
- Partials 328 330 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add this to the IO docs and a simple example of cancelation?
I'll add the docs for parallelization and cancelation after the release. My plan is that because testing this is hard we'll do a beta with some maintainers and selected projects first, and promo it once it's proven to work correctly. Maybe add |
Make
IO
have a new cancellable runAsync operator that ties into the run loop for cancellation. It improves over the old way of doing it at coroutine (flatMap) boundaries because now we can cancel after every operator call instead.I'm tempted to make the cancellable asyncRun the default, as it has the same overhead with and without it cc @raulraja for opinion.
With cancellation and parallelism we can build races, which means we can finally have a proper concurrency framework and libraries for Android!