Kotlin Coroutines Tutorial, Part 1: Suspend Functions, Coroutine Scopes, Async and More
ฝัง
- เผยแพร่เมื่อ 26 ก.ค. 2024
- Written form: blog.rockthejvm.com/kotlin-co...
Complete Kotlin course: rockthejvm.com/p/kotlin-essen...
In this video, we explore coroutines and structured concurrency in Kotlin. We talk about what Kotlin coroutines are, how they work, how they are different from regular threads, blocking computations, and how we can run suspend functions. We also discuss coroutine scopes and controlling the sequence and structure of parallel/concurrent computations with coroutines (structured concurrency).
Contents:
0:00 Intro, threads vs coroutines
4:12 running coroutines
9:02 coroutine scopes
14:45 structured concurrency
20:19 returning values from coroutines
Follow Rock the JVM on:
LinkedIn: / rockthejvm
Twitter: / rockthejvm
Blog: blog.rockthejvm.com
Website: rockthejvm.com - วิทยาศาสตร์และเทคโนโลยี
Great video, hope to see more Kotlin content from you! 👍🏻
I took your Scala Basics and Advanced Scala courses. They were excellent. I would love to take Kotlin courses offering a similar level of depth. Please do consider creating something like that, they would be most welcome!
Awesome video, I'm starting to learn Coroutines and your content is superb.
Finally, you start using Kotlin to rock the JVM.
Bro, this is much better than many stuff I've watch in Udemy that I paid for
This guy knows his stuff, thanks for teaching me the meat of coroutines.
Hey Daniel, this is quite brilliant. Advanced stuff made really simple.
Great explanation buddy! Thanks for the knowledge!
excellent video, looking forward to se more kotlin videos.
Great explanation! 👍
Impressive man, more coroutine video please :)
superb video
Good description of Coroutines Daniel, do not stop this topic. Maybe you will also make some videos about Channels and Flow? Or even dedicated couse on RockTheJVM?
Yep!
Hope you make a Kotlin course soon (I am coming from Scala, but job/project offers there get rare)
Please make more Kotlin
Would love to see an advanced Kotlin course from you, anything in the works?
Yes! Coroutines, Arrow and advanced language features, all in the making
I wonder of how to do this: launching n jobs concurrently and starting another job when any m jobs finish.
Author, any plans to create a comparation video: scala vs kotlin, pluses/minuses? With deep comparations.
Yep!
Just out of curiosity, why do you upload your videos in 2160p? Is your IntelliJ window even 2160pixels tall?
Yes
What, does that mean that coroutines act similar as an IO Monad?
Effects are a different concept altogether. Coroutines and _fibers_ are the same concept (that of "light thread").
What? When did you learn Kotlin?
Is there anything equivalent to Kotlin coroutines in Scala?
I think it was mentioned in the video. I think it’s called fibres.