Coroutines on the Backend

Learn why threads are expensive compared to coroutines and get a demonstration of memory consumption of threads vs. Kotlin coroutines.

The most significant advantage of using coroutines on the backend is simplicity. Unlike RxJava, using coroutines barely changes how our code looks. In most cases, migrating from threads to coroutines only involves adding the suspend modifier. When we do this, we can quickly introduce concurrence, test concurrent behavior, cancel coroutines, and use all the other powerful features we'll explore in this course.

Get hands-on with 1200+ tech skills courses.