You can do flow { try { ... emit here } finally { cleanup() } }
but we’ve also recently added onCompletion { cleanup() }
operator that makes it possible to write the above in a declarative way.
You can do flow { try { ... emit here } finally { cleanup() } }
but we’ve also recently added onCompletion { cleanup() }
operator that makes it possible to write the above in a declarative way.