workflow-kotlin icon indicating copy to clipboard operation
workflow-kotlin copied to clipboard

Add lock for render pass if we want to use a non-single threaded `CoroutineDispatcher` in the context for the runtime.

Open steve-the-edwards opened this issue 9 months ago • 0 comments
trafficstars

Otherwise, worker output (or anything sending to the sink like actions too) could happen during a render pass and we would get a lot of:

java.lang.UnsupportedOperationException: Expected sink to not be sent to until after the render pass. Received action: EmitWorkerOutputAction(worker=TypedWorker(), key=my_worker)

If we lock handling actions in the sink during the render pass then we could allow this parallelism.

For now we can only handle single-threaded dispatchers.

steve-the-edwards avatar Jan 30 '25 17:01 steve-the-edwards