-
Notifications
You must be signed in to change notification settings - Fork 617
Remove some synchronized blocks from FirebaseAppDistributionImpl #4353
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
Conversation
Generated by 🚫 Danger |
480af03
to
bc86a6f
Compare
Coverage Report 1Affected Products
Test Logs |
class TaskCache<T extends Task> { | ||
|
||
/** A functional interface for a producer of a new Task. */ | ||
interface TaskProducer<T extends Task> { |
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.
Could you just use the generic java.util.function.Supplier
here?
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.
Functional interfaces were only added in API level 24, so we'd have to up our minSdkVersion from 16.
...-appdistribution/src/main/java/com/google/firebase/appdistribution/impl/UpdateTaskCache.java
Outdated
Show resolved
Hide resolved
Size Report 1Affected Products
Test Logs |
2d90265
to
4cf7d38
Compare
4cf7d38
to
9693214
Compare
* Remove some synchronized blocks from FirebaseAppDistributionImpl * Rename UpdateTaskCache.java to TaskCache.java * Add @FunctionalInterface annotation * Reformat a comment
Uses a new
TaskCache
instead of relying on locks.