Coroutine Structured Concurrency, Error Handling and Exceptions

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

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

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

    I'm surprised that your channel has fewer subscribers than Coding in Flow. I always find your videos to be much more concise, and easier to follow and understand. You now have 128k subscribers so congrats to you Mitch and thanks as always!

  • @cosovic14
    @cosovic14 4 года назад +5

    You just earned a new sub my friend, thank you!
    I've been studying Android Dev for about a few months now and my mentor just introduced me to Coroutines and I'm trying to take it all in. This is a very helpful breakdown, appreciate it once again!

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

    I think you underestimate the value of your content do not fret over what other channels do. Your way of explaining isolated subjects through simple examples is extremely helpful and clear and someone looking to learn Android wil eventually bump into your channel and use it to learn their rope. Thanks.

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

    Definitely subscribing. You condensed days of reading bloated tutorials into a few single videos. Thank you and keep it up!

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

    hey Mitch you're the best Android Teacher I've ever had. You've helped me a lot to be professional at Android Programming. thank you so much. cheers to Mitch Tabian

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

    These videos are so timely. I started to go look for documentation for exactly this topic, and decided to check your channel first. Glad I did!

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

    Really nice breakdown of these examples 👍 Gave me a different perspective to think about.
    I haven't found myself typically concerned with the Jobs or in responding to the error or completion of all coroutines within a Job. I've always tended to focus on individual coroutines; handling exceptions on a case by base basis and using mechanisms like await() if I need to wait for everything before continuing execution.
    I can potential use cases though for installing exception handlers or completion responses at the job level though as well

    • @codingwithmitch
      @codingwithmitch  4 года назад +1

      Ya it wasn't clear to me until going through these types of examples. The parent is affected in various ways depending on what happens

    • @goobar
      @goobar 4 года назад +1

      @@codingwithmitch Yeah. I think I've never given too much thought to controlling/configuring the parent because I'm so often using the Jobs provided for Activity/Fragment & ViewModel. So I usually just have a couple of places where coroutines are aggregated/collected and just try to handle the exceptions for those locations.
      When I was at Udacity we were trying to implement offline support and had to download sometimes hundreds of small files at a time and then report back on the status of individual items as well as the group. In that case, I can see how having a Job setup for those specific tasks and the completion & error management, could be useful.

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

    watching from Japan. Your video is very very helpful. Thank you.

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

    Finally understanding coroutine exceptions after floundering for weeks

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

    Thank you so much for posting such a helpful video. Informative and explained well.
    Keep up the good work!

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

    Great explanation Mitch!!

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

    Hey, Thank you for your sharing knowledge .
    Please answer my question. At the end of the video you talked about supervisor Job. For the scenario that we want to continue running rest of the jobs and parent job. OK . but at the begin-middle of the video you talked and programmed about cancel() method or throw CancellationException.
    Are they similar to supervisor Job? if they are. So why do you talk about them ( cancel() method or throw CancellationException) ? I guess you follow cleanest way to do that, right?

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

    I like your videos, especially now that i started working with coroutines and after seeing your tutorials i need to change some of my code (lucky that im in the early stages), keep this up!!

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

    This was Exception-al. Great video

  • @anesabismail6111
    @anesabismail6111 4 года назад +1

    I think viewModelScope uses SupervisorJob, but why when I use CoroutineExeptionHandler with ViewModelScope it doesn't catch exceptions?

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

    16:20 So that's the job of Supervisor Job, I was using it in my projects for eons but I had no idea what it does.

  • @hnim2292
    @hnim2292 4 года назад +1

    Never missed a video in this coroutine series. Thanks Mitch!
    I have a question, in some videos you use something like
    val job = Job()
    jobA = CoroutineScope.launch(IO + job){ //....}
    so that you can cancel all other jobs that use the same job. Is this telling job is the parent job of jobA? And all the purpose of this is manage other jobs, like we can cancel it?

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

      no, it's of scope, not parent hierarchy

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

    I love you both CodingInFlow and CodingWithMitch :)

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

    Hey Mitch,you removed the Corona discount coupon on codingwithmitch's founder subscription ?

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

    Very comprehensive

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

    You explained so nicely 👍

  • @mitch8204
    @mitch8204 4 года назад +1

    Hello namesake, thanks for the awesome elaborations

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

    Hey mich ,
    Cancellation within he launch WOULD cancel that specific job , but wont do anything to the parent Job .
    Isn't that the case? .. I was testing it myself .. and as soon as I called cancel() inside launch of a scope , i started getting isActive as false .

  • @markstoica2405
    @markstoica2405 4 года назад +1

    Thanks Mitch! It helped me a lot!

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

    Very good video, thanks for that!

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

    Love your videos man, Please share more videos about testing Hilt and navigation controller, complex scenarios

  • @ВиталийПугач-к8ю

    Thank you

  • @HienNguyen-xn7tr
    @HienNguyen-xn7tr 4 года назад

    what exactly are quarantine cancellation and quarantine exception

  • @swingtrade9270
    @swingtrade9270 4 года назад +1

    Best video content..

  • @igorg.8624
    @igorg.8624 4 года назад

    Do we have to use Job's on Android?

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

    This delay funtion seems to be deprecated? Should I throw this movie away?

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

    It would really be more helpful if you continue on making the videos based on exploring Kotlin STL and some of its core features like inline, apply, launch, get() etc.

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

    Hello, Mitch.. Could you please do one video about Executing AndroidX tests on JVM?. If so, It will be very helpful.

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

    You are just amazing 🙏🙏💐💐

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

    Mitch I think you are wrong in 2 scenario when 2nd job will use cancel(CancellarionException("Error result for number: ${number}"))
    It will show the Exception as JobcancellationException and you said it will do nothing.. check once

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

    Thank you a lot you are the best.

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

    Hey, where is the video about SupervisedJob?

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

    I am your big fan ...sir Thanks lot :)

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

    Great Job!

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

    Hahahaha the part with Florian was golden

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

    you are the best Mitch :)))

  • @yt-1161
    @yt-1161 8 месяцев назад

    on my mobile phone video quality cannot go beyond 360p ???

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

    Nice

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

    You`re crazy!!! I love u, bro)

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

    Best

  • @foreverrafs
    @foreverrafs 4 года назад +1

    ❤️❤️❤️

  • @charuwaka1
    @charuwaka1 4 года назад +1

    please make tutorial on Supervisor JOB

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

    cancel() method is deprecated now.

  • @kamothesci03siddhantmandap95
    @kamothesci03siddhantmandap95 4 года назад +1

    First 😊

  • @goobar
    @goobar 4 года назад +12

    who is that CodingInFlow guy anyways 👀.... lol

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

    Engage the bendy space engines

  • @igorg.8624
    @igorg.8624 4 года назад

    Jobs will not be executed simultaneously unless you use Async / Await

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

    try { awesomeCodingWithMitchVideo() } catch { TerribleFontException() }

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

    You were right that was quite a shitty vlog! Ugh!

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

    Mitch, I think your channel has worse "rank" on RUclips, because that other channel you mentioned has few videos about very very basic stuff, where the best is "How to Make a Button Open a New Activity" that has 1M+ views. Your video with most views has at this moment 369K and is about... MVVM. Thats a lot if you consider that level of content. Higher level of content means less audience, because there are like 10x less programmers who actually may be interested in MVVM, than beginners who need to know how to open an activity.

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

    Coroutines ere the most stupid concept for asynchronous programming in any language I have learned. Exception handling have too many "exceptions" around it. It's like it was designed by a middle schooler

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

    Hi
    kotlinx.coroutines.JobCancellationException: UndispatchedCoroutine was cancelled
    getting this issue when i change activity(it was observing a stateflow from ViewModel )