1 min readJul 9, 2019
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.
Project Lead for the Kotlin Programming Language @JetBrains