Roman Elizarov
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.

--

--

Roman Elizarov
Roman Elizarov

Written by Roman Elizarov

Project Lead for the Kotlin Programming Language @JetBrains

No responses yet