-
-
Notifications
You must be signed in to change notification settings - Fork 801
Open
Labels
enhancementNew feature or requestNew feature or request
Description
AppDatabase.getInstance is thread safe with a synchronized block to avoid having multiple thread creating multiple instance of the database and overriding the instance
static attribute.
The issue is that if multiple actor call getInstance all of them are going to be blocked by the synchronized block if the instance is not yet created and it leads to ANR.
We should avoid this and only have Hilt invoking this function. It means a huge work to adapt the codebase to always rely on Hilt to get the database never using getInstance
, by doing so we ensure we won't ever have an ANR again on this function.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request