Skip to content

Commit 81c5795

Browse files
authored
Merge pull request #1301 from square/sedwards/revert-yield
Revert yield() for CSR
2 parents bb7541c + 8bbc9bc commit 81c5795

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

workflow-runtime/src/commonMain/kotlin/com/squareup/workflow1/RenderWorkflow.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import kotlinx.coroutines.flow.MutableStateFlow
1212
import kotlinx.coroutines.flow.StateFlow
1313
import kotlinx.coroutines.isActive
1414
import kotlinx.coroutines.launch
15-
import kotlinx.coroutines.yield
1615

1716
/**
1817
* Launches the [workflow] in a new coroutine in [scope] and returns a [StateFlow] of its
@@ -196,10 +195,6 @@ public fun <PropsT, OutputT, RenderingT> renderWorkflowIn(
196195
var conflationHasChangedState = false
197196
conflate@ while (isActive && actionResult is ActionApplied<*> && actionResult.output == null) {
198197
conflationHasChangedState = conflationHasChangedState || actionResult.stateChanged
199-
// We start by yielding, because if we are on an Unconfined dispatcher, we want to give
200-
// other signals (like Workers listening to the same result) a chance to get dispatched
201-
// and queue their actions.
202-
yield()
203198
// We may have more actions we can process, this rendering could be stale.
204199
actionResult = runner.processAction(waitForAnAction = false)
205200

0 commit comments

Comments
 (0)