Skip to content

Commit 3b118bf

Browse files
author
rachaprince
authored
Replace fixed sized thread pool with single thread in checkfornewrelease (#3186)
1 parent 9af0c6f commit 3b118bf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

firebase-app-distribution/src/main/java/com/google/firebase/app/distribution/CheckForNewReleaseClient.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import java.util.concurrent.Executors;
3838

3939
class CheckForNewReleaseClient {
40-
private static final int NEW_RELEASE_THREAD_POOL_SIZE = 4;
4140
private static final String TAG = "CheckForNewReleaseClient:";
4241

4342
private final FirebaseApp firebaseApp;
@@ -56,8 +55,7 @@ class CheckForNewReleaseClient {
5655
this.firebaseApp = firebaseApp;
5756
this.firebaseAppDistributionTesterApiClient = firebaseAppDistributionTesterApiClient;
5857
this.firebaseInstallationsApi = firebaseInstallationsApi;
59-
// TODO: verify if this is best way to use executorservice here
60-
this.checkForNewReleaseExecutor = Executors.newFixedThreadPool(NEW_RELEASE_THREAD_POOL_SIZE);
58+
this.checkForNewReleaseExecutor = Executors.newSingleThreadExecutor();
6159
this.releaseIdentifierStorage =
6260
new ReleaseIdentifierStorage(firebaseApp.getApplicationContext());
6361
}

0 commit comments

Comments
 (0)