Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 811754a0 authored by Steve Elliott's avatar Steve Elliott
Browse files

[kairos] uncap transaction scheduler channel

Flag: com.android.systemui.status_bar_mobile_icon_kairos
Bug: 383172066
Test: atest
Change-Id: If907f2b11f45949ea49364fe22857e4082408f84
parent 66e62af0
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ internal class Network(
    private val muxMovers = ArrayDeque<MuxDeferredNode<*, *, *>>()
    private val deactivations = ArrayDeque<PushNode<*>>()
    private val outputDeactivations = ArrayDeque<Output<*>>()
    private val inputScheduleChan = Channel<ScheduledAction<*>>()
    private val inputScheduleChan = Channel<ScheduledAction<*>>(Channel.UNLIMITED)

    override fun scheduleOutput(output: Output<*>) {
        fastOutputs.add(output)
@@ -169,14 +169,10 @@ internal class Network(
                onResult.cancel()
                return@also
            }
            val job =
                coroutineScope.launch {
                    inputScheduleChan.send(
            inputScheduleChan.trySend(
                ScheduledAction(reason, onStartTransaction = block, onResult = onResult)
            )
        }
            onResult.invokeOnCompletion { job.cancel() }
        }

    inline fun <R> runThenDrainDeferrals(block: () -> R): R =
        block().also { deferScopeImpl.drainDeferrals() }