A Guide To CompletableFuture in Java with Examples | Asynchronous Operations in Java | Geekific

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

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

  • @liam45537
    @liam45537 Год назад +17

    Hands down the best explanation of completable futures out there. You're a master at explaining difficult concepts

    • @geekific
      @geekific  Год назад +1

      Thanks! Glad it helped :)

  • @OldBalance42
    @OldBalance42 Год назад +7

    Great explanation, better than other guides on the internet.

  • @mac_88_59
    @mac_88_59 8 месяцев назад +1

    This explanation is amazing and so clear. Thank you.

  • @caiosaldanha2371
    @caiosaldanha2371 6 месяцев назад +1

    That was the best explamnation so far! Thank you very much!

  • @Jaimecoder
    @Jaimecoder 23 дня назад

    excellent tutorial! thank you!

    • @geekific
      @geekific  22 дня назад

      Glad it was helpful!

  • @petrow_
    @petrow_ 6 месяцев назад +1

    So cool, at last. Thanks a lot!

  • @pavankumar-hg9ot
    @pavankumar-hg9ot 4 месяца назад +1

    Excellent information

  • @Official_Joshua
    @Official_Joshua Год назад +1

    Thanks so much for this video it helped alot. This is the best one yet. i tried all the other videos and this one made it clear

  • @iaburrahman3454
    @iaburrahman3454 Год назад +1

    Enjoyable explanation. Thanks a lot.

  • @alitahboub493
    @alitahboub493 Месяц назад

    amazing video

  • @misaelpereira9679
    @misaelpereira9679 9 месяцев назад +1

    Such a wonderful explanation with good examples of each scenario, definitely you get to the point!, you get a new suscriber!

  • @radhikashroff2643
    @radhikashroff2643 11 месяцев назад

    Excellent Explanation !

  • @faisalahmed4054
    @faisalahmed4054 3 месяца назад

    great explanation

  • @shashikantnipanikar860
    @shashikantnipanikar860 6 месяцев назад

    Really helpful

  • @KarthickKesavan-s8i
    @KarthickKesavan-s8i 2 месяца назад

    Can u make a video on writing test cases for CompletableFutures

    • @geekific
      @geekific  2 месяца назад

      Will add it to my list, stay tuned!

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

    @geekific dude, your videos are jewels.

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

    Thank you!!! Great topic and explanation of it.

  • @MD.PoragSarkar
    @MD.PoragSarkar 3 месяца назад

    Liked and subscribed...

  • @arnabchowdhury4892
    @arnabchowdhury4892 11 месяцев назад

    Please create video on fork and join

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

    Perfect Thanks a lot !

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

      Glad it was helpful!

  • @Talaria.School
    @Talaria.School 2 года назад

    Thanks a lot

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

    I wondered if you might have tackled it elsewhere, but when I attempt to use the .sleep() method, it says that an InterruptedException can be thrown. Now I can handle this by either adding it to the method signature, or use a try-catch block. Now when I use a try-catch block, there is a warning that it is not enough to simply ignore the exception that is thrown, it needs to be re-thrown or interrupted.
    I have used something along the lines of:
    ```
    ...
    try {
    TimeUnit.x.sleep(y);
    } catch (InterruptedException e) {
    Thread.currentThread.interrupt();
    }
    ...
    ```
    Now I have no idea what the reason is behind this, and then when I have tried to throw the InterruptedException, it asks me to surround it in a try catch block inside the catch block.
    Not sure if this is thread specific, and if you covered it anywhere else, or able to cover it.
    Thanks in advance for any information.

    • @geekific
      @geekific  Год назад +3

      First, you just gave me an idea for a video! Thanks :)
      And to briefly answer your question, yes what you are doing is the way to go, and that's because each thread has kind of an "interrupted" flag, and if you simply ignore the exception, the thread's interrupted flag will not be set, and it will continue executing as if nothing happened, or that thread won't be handled appropriately by other threads. By calling this method in the catch block, you are setting the interrupted flag on the thread that was interrupted, allowing other parts of your code to check it and handle the thread appropriately. Hope this partly answers it, and stay tuned for more videos!

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

    Great explanation