Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn asynchronous programming in Kotlin through this comprehensive tutorial covering coroutines, the language's approach to non-blocking programming for server-side, desktop, and mobile applications. Explore the fundamental concepts of coroutines and understand how they differ from traditional threads while providing fluid user experiences and scalable solutions. Master coroutine builders including launch, async, and runBlocking functions along with the GlobalScope companion object for creating and managing coroutines. Discover cooperative cancellation techniques, exception handling strategies, and timeout mechanisms to build robust asynchronous applications. Study different approaches to composing suspending functions through sequential, concurrent, and lazy execution patterns to optimize performance. Examine Kotlin dispatchers, CoroutineContext, and CoroutineScope to understand how coroutines operate within different execution contexts and manage their lifecycle effectively. Gain practical knowledge of how coroutines enable not only asynchronous programming but also open possibilities for concurrency patterns and actor-based programming models.
Syllabus
Kotlin Coroutines: Explore what are coroutines in kotlin. Threads vs. Coroutines
Kotlin Coroutine Builders: launch, async, and runBlocking along with GlobalScope companion object
Kotlin Coroutine Cancellation: Cooperative cancellation, Handle Exceptions, and Timeouts
Kotlin Coroutines: Composing Suspending Functions - Sequential, Concurrent, and Lazy Execution
Kotlin Dispatchers, CoroutineContext, and CoroutineScope
Taught by
Smartherd