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
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 28

  • @olivereisenbarth5476
    @olivereisenbarth5476 ปีที่แล้ว +15

    Great video, hope to see more Kotlin content from you! 👍🏻

  • @RookSoto
    @RookSoto ปีที่แล้ว +9

    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!

  • @loopnervoso
    @loopnervoso 2 หลายเดือนก่อน +2

    Awesome video, I'm starting to learn Coroutines and your content is superb.

  • @user-cm4ce5fh4q
    @user-cm4ce5fh4q 9 หลายเดือนก่อน +1

    Finally, you start using Kotlin to rock the JVM.

  • @walrider7374
    @walrider7374 ปีที่แล้ว +2

    Bro, this is much better than many stuff I've watch in Udemy that I paid for

  • @bobyrasta100
    @bobyrasta100 ปีที่แล้ว

    This guy knows his stuff, thanks for teaching me the meat of coroutines.

  • @saiaussie
    @saiaussie 9 หลายเดือนก่อน +1

    Hey Daniel, this is quite brilliant. Advanced stuff made really simple.

  • @albertopillado6890
    @albertopillado6890 9 หลายเดือนก่อน +1

    Great explanation buddy! Thanks for the knowledge!

  • @zhou322
    @zhou322 ปีที่แล้ว +1

    excellent video, looking forward to se more kotlin videos.

  • @Vekinho5
    @Vekinho5 ปีที่แล้ว +1

    Great explanation! 👍

  • @TheProximator
    @TheProximator 10 หลายเดือนก่อน +1

    Impressive man, more coroutine video please :)

  • @renghenkow
    @renghenkow ปีที่แล้ว

    superb video

  • @UdavPit
    @UdavPit ปีที่แล้ว +4

    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?

  • @LongLiveEnduro
    @LongLiveEnduro 6 หลายเดือนก่อน

    Hope you make a Kotlin course soon (I am coming from Scala, but job/project offers there get rare)

  • @iamrigank
    @iamrigank 9 หลายเดือนก่อน +1

    Please make more Kotlin

  • @plissk3n1337
    @plissk3n1337 2 หลายเดือนก่อน +1

    Would love to see an advanced Kotlin course from you, anything in the works?

    • @rockthejvm
      @rockthejvm  2 หลายเดือนก่อน +1

      Yes! Coroutines, Arrow and advanced language features, all in the making

  • @avalagum7957
    @avalagum7957 ปีที่แล้ว

    I wonder of how to do this: launching n jobs concurrently and starting another job when any m jobs finish.

  • @dmitrykaa46
    @dmitrykaa46 ปีที่แล้ว

    Author, any plans to create a comparation video: scala vs kotlin, pluses/minuses? With deep comparations.

  • @MaxCoplan
    @MaxCoplan ปีที่แล้ว

    Just out of curiosity, why do you upload your videos in 2160p? Is your IntelliJ window even 2160pixels tall?

  • @HombrexGSP
    @HombrexGSP ปีที่แล้ว

    What, does that mean that coroutines act similar as an IO Monad?

    • @rockthejvm
      @rockthejvm  ปีที่แล้ว +1

      Effects are a different concept altogether. Coroutines and _fibers_ are the same concept (that of "light thread").

  • @avalagum7957
    @avalagum7957 ปีที่แล้ว

    What? When did you learn Kotlin?
    Is there anything equivalent to Kotlin coroutines in Scala?

    • @MirrorsEdgeGamer01
      @MirrorsEdgeGamer01 ปีที่แล้ว +1

      I think it was mentioned in the video. I think it’s called fibres.