I was going through the concept of co-routines and it's usage and implementation in kotlin.
I googled and read few answers as in how it is different from threads in terms of architecture and performance.
Very well explained here,
Difference between a "coroutine" and a "thread"?
Fair enough, co-routines are great, no memory overhead, great performance, no dead-locks, race-conditions and etc. and easy to use.
Now, here are few things, I am confused about and would like more clarity on the same -
- When should I use co-routines and thread in Android? Or should I stick with just co-routines?
- If, I just stick with co-routines then how it will take advantage of CPU-cores, as it runs on a single thread.
Co-routines are great to use, but how it takes advantage of multiple cores for performance.