square/workflow-swift

sending actions during action propagation should likely assert

jamieQ opened this issue · 0 comments

consider the following pattern:

childWorkflow
  .mapOutput { sink.send(.someOutput) }
  .ignoreOutput()
  .rendered(in: context)

this will often 'work', but causes concurrent action handling in the runtime. using sinks during action propagation should likely trigger some form of debug assertion at a minimum, since emitting actions during action handling can lead to unexpected processing/dropped events, or redundant render passes.