-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
New integration: AndroidX Lifecycle #760
Commits on Nov 5, 2018
-
New integration: AndroidX Lifecycle
Includes: - Job and CoroutineScope extensions for Lifecycle and LifecycleOwner - Transitive dependency to kotlinx-android artifact - Tests and test supporting code - Documentation - Entry in binary-compatibility-validator build.gradle file
Configuration menu - View commit details
-
Copy full SHA for 3cbe424 - Browse repository at this point
Copy the full SHA 3cbe424View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b59a93 - Browse repository at this point
Copy the full SHA 5b59a93View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5df9041 - Browse repository at this point
Copy the full SHA 5df9041View commit details -
Configuration menu - View commit details
-
Copy full SHA for 82af7d6 - Browse repository at this point
Copy the full SHA 82af7d6View commit details -
Move AndroidX lifecycle coroutineScope extensions
…to LifecycleDefaultScopes.kt That is to prevent class initialization in case they are not used.
Configuration menu - View commit details
-
Copy full SHA for 39c5df3 - Browse repository at this point
Copy the full SHA 39c5df3View commit details -
Add cached into the jobs and scopes cache maps
This makes the intent more explicit
Configuration menu - View commit details
-
Copy full SHA for 5ae0603 - Browse repository at this point
Copy the full SHA 5ae0603View commit details -
Replace ConcurrentHashMap by mutableMapOf
Because the maps are just a best effort cache, we don't need the concurrency safety that ConcurrentHashMap offers. If the scopes or jobs are accessed concurrently, there may be multiple created instances, but eventually, an attempt to remove them from the caching map will always be performed when the lifecycle is destroyed.
Configuration menu - View commit details
-
Copy full SHA for 428b78c - Browse repository at this point
Copy the full SHA 428b78cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d4261a - Browse repository at this point
Copy the full SHA 6d4261aView commit details -
Add Lifecycle observer only on next event loop
This allows to support use cases like creating a scope active while STARTED from an Activity onStart() method.
Configuration menu - View commit details
-
Copy full SHA for a4a6621 - Browse repository at this point
Copy the full SHA a4a6621View commit details
Commits on Nov 7, 2018
-
Fix possible concurrency issues
Replacing mutableMapOf() with ConcurrentHashMap(). Regular HashMap could lead to an infinite loop in some cases where the map would be accessed concurrently.
Configuration menu - View commit details
-
Copy full SHA for 25e26ff - Browse repository at this point
Copy the full SHA 25e26ffView commit details