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 {
40
40
val submittingState = this .state
41
41
check(submittingState is State .Submitting ) { " submit() may not be called after drain()" }
42
42
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()
51
49
}
52
50
}
53
51
}
@@ -62,7 +60,7 @@ internal class BackgroundQueue {
62
60
check(submittingState is State .Submitting ) { " drain() may not be called more than once" }
63
61
this .state = State .Draining
64
62
65
- submittingState.run { completedTasks.acquire(taskCount) }
63
+ submittingState.completedTasks.acquire(submittingState. taskCount)
66
64
}
67
65
68
66
private sealed interface State {
You can’t perform that action at this time.
0 commit comments