KotlinConf 2019: Coroutines! Gotta catch 'em all! by Florina Muntenescu & Manuel Vivo

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 47

  • @marcelohernandez229
    @marcelohernandez229 5 лет назад +39

    Great talk! I love Coroutines, but trying to grasp exception handling is quite the learning curve.
    One thing to be mindful of is that when using runCatching or try/catch (Throwable), this will also catch the CancellationException when Coroutines are cancelled. However, this Exception is a special case and should not be treated as any other exception. It should be re-thrown in order to allow the Coroutine cancellation mechanics to work as intended.

  • @codinginflow
    @codinginflow 4 года назад +63

    Jesus Christ that's confusing

    • @j2shoes288
      @j2shoes288 3 года назад +11

      "RxJava was confusing, so, we now have Coroutines that makes is easier and simple to use"
      2 yrs later "Coroutines was confusing, so, we now have XXX that makes is easier and simple to use"

    • @mohsenteymouri5426
      @mohsenteymouri5426 3 года назад +2

      Because they have deep dive in under the hood bro, don't worry about that.

  • @j2shoes288
    @j2shoes288 3 года назад +14

    that was so confusing that we'll have to write our own code, to test whether or not what he said was true! ridiculous

  • @dmytropashko2437
    @dmytropashko2437 4 года назад +3

    I got a new challenge to calculate how many times she said cancel, cancelled or cancelable 😂😂😂

  • @karahsekir5494
    @karahsekir5494 2 года назад +10

    Great presentation, thank you. The coroutine API is just terrible. The propagation rules are unclear (when can who inherit what) the most telling is the Job/SupervisorJob example around 25:00 where I also thought the their parent is SupervisorJob (when in fact it was Job). Kotlin fixed a lot of Java issues but when it came to creating their own API they messed up just as Java. Nonetheless it’s still the best language on the JVM.

    • @rollebonmarquis7574
      @rollebonmarquis7574 Год назад

      I got confused at this part as well. Though, I think that the presentation at 05:20 and onwards can help & does explain why does this at 25:00 happens (in my current understanding).

  • @sauravsingh7216
    @sauravsingh7216 3 года назад +5

    I've seen Manuel using the sentence "what's going under the hood" at least one time in every video..

  • @islamassem2448
    @islamassem2448 3 года назад +2

    I hope if you can provide English translation as auto translation is massed up

  • @randomrainforest
    @randomrainforest 4 года назад +4

    coroutines in quarantine ;P

  • @eldathray9703
    @eldathray9703 4 года назад +3

    Great talk! But I have to say it's a little too fast for me...maybe because I'm not English-native, but other talk don't give me such feeling.

    • @Dmitry_Timchenko
      @Dmitry_Timchenko 4 года назад

      Yes, Manuel's spoken English is not very good, contrary to Florina, who speaks excellently.

    • @tejaa2532
      @tejaa2532 3 года назад +1

      The kotlin developer advocate team from Jetbrains and Android dev rel team needs to conduct English pronunciation classes for non native speakers :P.

  • @laujimmy9282
    @laujimmy9282 3 года назад +1

    How come if I changed
    while (i < 5)
    to
    for ( i in 0 .. 4)
    the coroutine cancelled successfully right after printing "Hello 0" ?

    • @laujimmy9282
      @laujimmy9282 3 года назад +1

      So for people who have the same question.
      It's because the effect of the while loop and the for loop are different.
      since " i " does not increment every time while loop goes around, it would run more than 5 times.
      in order to have the same or similar effect as while loop. We can change it to for (i in 0 .. Int.MaxValue)

  • @robchr
    @robchr 4 года назад +6

    Way simpler than RxJava (ಠ_ಠ)

  • @zekininadresi
    @zekininadresi 2 года назад

    at 26:45 -> if child fails with an "uncaught" exception, then how the supervisorScope is supposed to not fail? it was just said it would 2-3 slides prior to that point. maybe i did misunderstand what is meant by "if the child job fails"?

  • @francescafavilli6446
    @francescafavilli6446 3 года назад +3

    I'm half way through and can't help to ask myself... seriously?!? And all of this abstraction is supposed to be easier than raw multithreading in C?

  • @chiragprajapati3989
    @chiragprajapati3989 2 года назад

    Can we please get the presentation shown in video?

  • @puneetgoyal4561
    @puneetgoyal4561 2 года назад

    great talk :)

  • @ekkolin7527
    @ekkolin7527 2 года назад

    Where is the download address of PPT?

  • @ThePujjwal
    @ThePujjwal 3 года назад +4

    It seems developers of the Kotlin coroutines think that people don't have much complexity to deal with in life and as if developers have all the time in the world to understand coroutines. Couldn't this had been simpler ???

  • @oldergod
    @oldergod 3 года назад

    Good presentation, thank you

  • @yuez.4505
    @yuez.4505 3 года назад +1

    it is very useful, can you translate it in chinese?

  • @minthetnaing862
    @minthetnaing862 10 месяцев назад

    Exception 20:50

  • @papanino4415
    @papanino4415 4 года назад +7

    This is why I can't wrap my head around coroutines. You hear something from one source but you find out the opposite from another. First Florina says that cancelling child coroutines does not cancel the parent's scope, 15 mins later Manuel says that cancelling a child coroutine cancels its parent and all its siblings. WHICH IS IT?!

    • @osamamagdy8285
      @osamamagdy8285 4 года назад +11

      cancel != failed

    • @rajataggarwal743
      @rajataggarwal743 7 месяцев назад

      case 1: If you cancel a child coroutine willingly (job?.cancel), its not gonna affect its parent.
      case 2: If child coroutine gets cancelled due to some exception which is not handled, it will propagate up to the parent..doing chaos.
      This is what I think the scenario is. Corrections welcomed if any :)

  • @hectorantoniotafoyagarcia4735
    @hectorantoniotafoyagarcia4735 3 года назад +3

    Well it's not thaaat confusing, however the part at 25:30 and 35:00 are very poor design decisions.

  • @Dmitry_Timchenko
    @Dmitry_Timchenko 4 года назад +2

    Seems too complicated. In Go, _goroutines_ are much simpler.

  • @mihaimanole2643
    @mihaimanole2643 4 года назад

    Be careful what's your job: to supervise or not 😝🤔 Why should be complicated? I think I heard somewhere about supervisors... In Erlang I think. Yeah, it's Erlang's legacy. I hope to have a good reason.

  • @АнтоновнаН
    @АнтоновнаН 4 года назад +1

    KOT... BLIN, JAVA... BLIN

  • @YaLi-jb4vw
    @YaLi-jb4vw 5 лет назад +1

    这个女的不是Google的员工吗? 共享员工?

  • @ThePujjwal
    @ThePujjwal 3 года назад

    It's already an arcane topic and the way this young man is speaking English, that's making it further difficult to understand.