Or you can better do things like: ```IO.unit ...
# arrow
j
Or you can better do things like:
Copy code
IO.unit
      .continueOn(<http://Uniflowdispatcher.dispatcher.io|Uniflowdispatcher.dispatcher.io>)
      .flatMap { sideEffect() }
      .unsafeRunScoped(scope) { callback ->
         // TODO
      }
Still adding IO to the combo there is not gonna make much difference given uniflow works eagerly anyways, afaik. You’ll end up needing to unsafe run the IO to enforce the state update to happen right there, @arnaud.giuliani can confirm
a
uniflow just run your action, that is using Coroutines then
Threading DSL is just a convenient way to change thread with the Uniflow dispatcher
j
Yep. That is eager evaluation, it's how coroutines work by default
a
yes, i don’t change anything regarding this. Just simplifying the way to write it with uniflow
👍 1