The importance of concurrency is discovered quite early on by people who start with Android development. Android is inherently asynchronous and event-driven, with strict requirements as to on which thread certain things can happen.

Add to this the often-cumbersome Java callback interfaces, and you will be trapped in spaghetti code pretty quickly (aptly termed as “Callback Hell”). No matter how many coding patterns you use to avoid that, you will have to encounter the state change across multiple threads in one way or the other.

The only way to create a responsive app is by leaving the UI thread as free as possible, letting all the hard work be done asynchronously by background threads.

by will teach you the techniques you need to solve common programming problems using asynchronous programming.



Source link https://www.raywenderlich.com/9323-kotlin-coroutines-by-tutorials

LEAVE A REPLY

Please enter your comment!
Please enter your name here