Programming Throwdown cover image

144: Kotlin Coroutines with Marcin Moskala

Programming Throwdown

00:00

How to Use the Sealed Function With No Arguments to Block Threats

Coroutines can only switch at the suspension points. So if those coroutines never suspend what is very unlikely because we generally use coroutines to do things that are suspending. However, even in such extremely rare situations there are good practices like using the sealed function with no arguments. If you have things that are blocking there is a dispatcher IO to be blocked. And on Android the most popular is this patch is main that is a pool of threats that only has one threat that is the main threat - and it's perfectly fine for simple applications.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app