The Basics - Kotlin Coroutines

Stevdza-San November 20, 2020
Video Thumbnail
Stevdza-San Logo

Stevdza-San

View Channel

About

Greetings and welcome to my YouTube channel, my name is Stefan Jovanovic. I’m a Kotlin Multiplatform Developer and content creator. Love working on a new and exciting projects, sharing my knowledge with others, and always willing to learn more. For sponsorships & collaborations: [email protected]

Video Description

🏆 My Online Courses ⭐Discount Coupon: LAUNCH-STEVDZA-SAN https://stevdza-san.com 🐱‍👤 Wanna become a member? Join! https://www.youtube.com/channel/UCYLAirIEMMXtWOECuZAtjqQ/join 📸 Instagram https://www.instagram.com/stevdza_san/ A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously. Coroutines were added to Kotlin in version 1.3 and are based on established concepts from other languages. On Android, coroutines help to manage long-running tasks that might otherwise block the main thread and cause your app to become unresponsive. Over 50% of professional developers who use coroutines have reported seeing increased productivity. Kotlin, as a language, provides only minimal low-level APIs in its standard library to enable various other libraries to utilize coroutines. Unlike many other languages with similar capabilities, async and await are not keywords in Kotlin and are not even part of its standard library. Moreover, Kotlin's concept of suspending function provides a safer and less error-prone abstraction for asynchronous operations than futures and promises. kotlinx.coroutines is a rich library for coroutines developed by JetBrains. It contains a number of high-level coroutine-enabled primitives, including launch, async and others. Other videos: Scopes - https://youtu.be/kXSBkAA03Tc Jobs & Cancellation - https://youtu.be/wkMQGbU3tEM runBlocking - https://youtu.be/eXBSBKQN128 withContext - https://youtu.be/KUQKQ8rtF0k 🕒Timestamps: 0:00 - Introduction 0:22 - Synchronous vs Asynchronous 2:32 - Dispatchers 3:06 - Non-Blocking Execution 3:39 - Suspend Keyword 4:02 - Practical Examples

You May Also Like