DEV Community

Discussion on: Kotlin/Native Concurrency Changes…

 
dbaroncellimob profile image
Daniele Baroncelli • Edited

Hi Kevin, indeed in our project we have pretty small results, typically 2-3 KB Json responses (maximum 5KB).
If parsing 5KB isn't a problem on the main thread (using a suspend function), I am wondering what is actually a typical app situation where coroutines running on a background thread are necessary. I am expecting reading from a local sqlite or settings wouldn't require a background thread either.
Would you say that unless a function is cpu intensive (e.g. image processing, big file parsing, etc.), it's fine to use coroutines on the main thread?
If that is true, then I suppose MT coroutines shouldn't even be an issue for most KMP developers.