Fix race conditions in TaskContext and CancellationContext cancellation#1689
Open
diachenko-mischa wants to merge 1 commit intomasterfrom
Open
Fix race conditions in TaskContext and CancellationContext cancellation#1689diachenko-mischa wants to merge 1 commit intomasterfrom
diachenko-mischa wants to merge 1 commit intomasterfrom
Conversation
105bbc8 to
d1cb9e7
Compare
d1cb9e7 to
5e49b85
Compare
Tasks could be stuck on the cancellation, if task queue is already handling IO bound tasks: usual example is bad network connection, which forces tasks to wait for the timeout. This prevents tasks from being cancelled in time, and clients forced to wait, which in turn may cause ANR in unexpected places. - Enable pre-execution cancellation in TaskContext by registering a cancellation token that invokes PreExecuteCancel() - Schedule pre-execution cancellation on the separate cancellation lane in the task scheduler when it is available. Relates-To: HERESDK-12253 Signed-off-by: Mykhailo Diachenko <ext-mykhailo.z.diachenko@here.com>
5e49b85 to
4edc623
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1689 +/- ##
==========================================
+ Coverage 80.42% 80.46% +0.04%
==========================================
Files 351 351
Lines 14221 14280 +59
Branches 1544 1554 +10
==========================================
+ Hits 11437 11490 +53
Misses 2156 2156
- Partials 628 634 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates-To: HERESDK-12253