Skip to content
Discussion options

You must be logged in to vote

It sounds like your Flow should have used flowOn(IO) before it ever got near your UI. Just like how suspending functions should be "main" safe, Flows should be the same. It's perfectly acceptable to encapsulate blocking work within one, but that Flow should force itself to an appropriate dispatcher before it leaks out to somewhere where that context can be lost.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cwsiteplan
Comment options

Answer selected by cwsiteplan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants