File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
workflow-runtime/src/commonMain/kotlin/com/squareup/workflow1/internal/compose Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,10 @@ private class RealRecomposerDriver(
140
140
frameRequestChannel.onReceive { request ->
141
141
// Re-enqueue the request so it will be picked up by the next call to tryGetFrameRequest.
142
142
// We could use a separate property for this instead of the channel, but this keeps a single
143
- // source of truth.
143
+ // source of truth. There's no race condition with other frames being sent unless
144
+ // runRecomposeAndApplyChanges is called multiple times, since the compose runtime loop only
145
+ // calls withFrameNanos from a single coroutine, so if there's a frame then we know that
146
+ // coroutine is suspended and can't call it again.
144
147
frameRequestChannel.requireSend(request)
145
148
block()
146
149
}
You can’t perform that action at this time.
0 commit comments