Skip to content

Resources: modified AsyncCache to use Dispatchers.Unconfined - #5688

Open
Konstantin (terrakok) wants to merge 2 commits into
masterfrom
anr-fix
Open

Resources: modified AsyncCache to use Dispatchers.Unconfined#5688
Konstantin (terrakok) wants to merge 2 commits into
masterfrom
anr-fix

Conversation

@terrakok

@terrakok Konstantin (terrakok) commented Aug 6, 2026

Copy link
Copy Markdown
Member

Resources: modified AsyncCache to use Dispatchers.Unconfined and start shared requests lazily outside the critical mutex section.

The issue was that, inside AsyncCache, requests to the same resource were reused via async, which by default scheduled its work on Dispatchers.Default. That dispatcher could be overloaded with tasks, which in turn forced the Main thread to wait longer than allowed, resulting in an ANR.

Fixes https://youtrack.jetbrains.com/issue/CMP-6615

Testing

Added new unit tests

Release Notes

Fixes - Resources

  • Fixed android ANR when Dispatchers.Default is overloaded.

…start shared requests lazily outside the critical mutex section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant