"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"
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.
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.
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).
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"?
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)
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 ???
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?!
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 :)
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.
Jesus Christ that's confusing
"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"
Because they have deep dive in under the hood bro, don't worry about that.
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.
that was so confusing that we'll have to write our own code, to test whether or not what he said was true! ridiculous
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.
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).
Really great talk!, can you please share slides of the presentation?
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"?
I hope if you can provide English translation as auto translation is massed up
Well it's not thaaat confusing, however the part at 25:30 and 35:00 are very poor design decisions.
I've seen Manuel using the sentence "what's going under the hood" at least one time in every video..
How come if I changed
while (i < 5)
to
for ( i in 0 .. 4)
the coroutine cancelled successfully right after printing "Hello 0" ?
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)
I got a new challenge to calculate how many times she said cancel, cancelled or cancelable 😂😂😂
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.
Yes, Manuel's spoken English is not very good, contrary to Florina, who speaks excellently.
The kotlin developer advocate team from Jetbrains and Android dev rel team needs to conduct English pronunciation classes for non native speakers :P.
Can we please get the presentation shown in video?
Where is the download address of PPT?
coroutines in quarantine ;P
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?
Way simpler than RxJava (ಠ_ಠ)
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 ???
it is very useful, can you translate it in chinese?
Exception 20:50
great talk :)
Good presentation, thank you
Glad you enjoyed it!
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?!
cancel != failed
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 :)
Seems too complicated. In Go, _goroutines_ are much simpler.
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.
这个女的不是Google的员工吗? 共享员工?
yes bro
KOT... BLIN, JAVA... BLIN
KOTLIN abr karma object trans-language idiotos nature
It's already an arcane topic and the way this young man is speaking English, that's making it further difficult to understand.