File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
firebase-firestore/src/main/java/com/google/firebase/firestore/util Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,12 @@ internal class BackgroundQueue {
4040 val submittingState = this .state
4141 check(submittingState is State .Submitting ) { " submit() may not be called after drain()" }
4242
43- submittingState.run {
44- taskCount++
45- executor.execute {
46- try {
47- runnable.run ()
48- } finally {
49- completedTasks.release()
50- }
43+ submittingState.taskCount++
44+ executor.execute {
45+ try {
46+ runnable.run ()
47+ } finally {
48+ submittingState.completedTasks.release()
5149 }
5250 }
5351 }
@@ -62,7 +60,7 @@ internal class BackgroundQueue {
6260 check(submittingState is State .Submitting ) { " drain() may not be called more than once" }
6361 this .state = State .Draining
6462
65- submittingState.run { completedTasks.acquire(taskCount) }
63+ submittingState.completedTasks.acquire(submittingState. taskCount)
6664 }
6765
6866 private sealed interface State {
You can’t perform that action at this time.
0 commit comments