Posts

Showing posts from April, 2022

Kotlin coroutines on Android Step by Step Basic to advance

Image
Why we need Coroutine? So, we can say that  Coroutines  and the threads both are multitasking. But the difference is that threads are managed by the OS and  coroutines by the users  as it can execute a few lines of function by taking advantage of the cooperation. It's an optimized framework written over the actual threading by taking advantage of the cooperative nature of functions to make it light and yet powerful. So, we can say that  Coroutines  are lightweight threads. A lightweight thread means it doesn’t map on the native thread, so it doesn’t require context switching on the processor, so they are faster   hat exactly Coroutines are? Why there is a need for the solution which Kotlin Coroutines provide? Step by step guide on how to implement the Kotlin Coroutines in Android. What are scopes in Kotlin Coroutines? What are Coroutines? Coroutines = Co + Routines Here,  Co  means  cooperation  and  Routines  means  ...