-
Notifications
You must be signed in to change notification settings - Fork 612
Register executors as components. #4288
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 |
Coverage Report 1Affected Products
Test Logs |
Size Report 1Affected Products
Test Logs |
0c4e05b
to
99789c1
Compare
The intent for those is to be used by all Firebase SDKs and forbid creating their own at will.
99789c1
to
c030bbc
Compare
firebase-common/src/main/java/com/google/firebase/heartbeatinfo/DefaultHeartBeatController.java
Show resolved
Hide resolved
firebase-annotations/src/main/java/com/google/firebase/annotations/concurrent/Background.java
Show resolved
Hide resolved
firebase-annotations/src/main/java/com/google/firebase/annotations/concurrent/Lightweight.java
Outdated
Show resolved
Hide resolved
|
||
class CustomThreadFactory implements ThreadFactory { | ||
private static final ThreadFactory DEFAULT = Executors.defaultThreadFactory(); | ||
private final AtomicLong threadCount = new AtomicLong(); |
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.
why the counter?
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.
This is common practice to give different names to threads, i.e. executor-foo-1
, executor-foo-2
etc.
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.
Didn't see it in the name, thanks!
* Add qualifier support to firebase components. (#3180) * Add qualifier support to firebase components. Details: go/firebase-component-qualifiers * fix errorprone error. * change copyright year. * Register executors as components. (#4288) * Register executors as components. The intent for those is to be used by all Firebase SDKs and forbid creating their own at will. * Add copyrights. * add more copyrights * ktlintformat * gJF * ktlint * Address review comments. * Adds generally useful executors (#4305) Namely, SequentialExecutor and directExecutor. * Enable strict mode for executors. (#4303) Any violations would kill the app in debug builds of firebase-common, and log a warning in release builds. This is done to fail tests that incorrectly use executors while not affecting 3p apps in release builds. Additionally correctly set thread priorities in an Android specific way. * Enable thread pool linter check. (#4297) * Enable thread pool linter check. All violations are now suppressed, bugs filed to fix each product. * ktlint * Remove init * Fix copyright
* Add qualifier support to firebase components. (#3180) * Add qualifier support to firebase components. Details: go/firebase-component-qualifiers * fix errorprone error. * change copyright year. * Register executors as components. (#4288) * Register executors as components. The intent for those is to be used by all Firebase SDKs and forbid creating their own at will. * Add copyrights. * add more copyrights * ktlintformat * gJF * ktlint * Address review comments. * Adds generally useful executors (#4305) Namely, SequentialExecutor and directExecutor. * Enable strict mode for executors. (#4303) Any violations would kill the app in debug builds of firebase-common, and log a warning in release builds. This is done to fail tests that incorrectly use executors while not affecting 3p apps in release builds. Additionally correctly set thread priorities in an Android specific way. * Enable thread pool linter check. (#4297) * Enable thread pool linter check. All violations are now suppressed, bugs filed to fix each product. * ktlint * Remove init * Fix copyright
The intent for those is to be used by all Firebase SDKs and forbid creating their own at will.