mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Make FastJobStorage synchronous again.
This commit is contained in:
@@ -77,11 +77,6 @@ class JobController {
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
synchronized void flush() {
|
||||
jobStorage.flush();
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
synchronized void submitNewJobChain(@NonNull List<List<Job>> chain) {
|
||||
chain = Stream.of(chain).filterNot(List::isEmpty).toList();
|
||||
|
||||
@@ -320,10 +320,7 @@ public class JobManager implements ConstraintObserver.Notifier {
|
||||
public void flush() {
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
runOnExecutor(() -> {
|
||||
jobController.flush();
|
||||
latch.countDown();
|
||||
});
|
||||
runOnExecutor(latch::countDown);
|
||||
|
||||
try {
|
||||
latch.await();
|
||||
|
||||
@@ -11,9 +11,6 @@ public interface JobStorage {
|
||||
@WorkerThread
|
||||
void init();
|
||||
|
||||
@WorkerThread
|
||||
void flush();
|
||||
|
||||
@WorkerThread
|
||||
void insertJobs(@NonNull List<FullSpec> fullSpecs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user