Introduction to Java Semaphores - Java Programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ม.ค. 2025

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

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

    please, continue with this content fundementals of java, that is nice

  • @DenaTollefson
    @DenaTollefson ปีที่แล้ว +7

    Fantastic video on semaphores, Will! I love it how you have relevant examples to make everything understandable. LoL the "spinning wheel of death" 😀😀😀

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

      Hahaha I was hoping the spinning wheel of death analogy would be a good one

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

      @@willtollefson Indeed!!! 🤩

  • @SurajVerma-k7k
    @SurajVerma-k7k 4 หลายเดือนก่อน +1

    Hii Will,
    Thanks for making this video.
    I have a quick question here , it may seem little bit silly to you.
    why in 12:02 section of the video, we are trying to use a object instance of Thread class to call print status method. Pls explain if possible. and Thanks again!

    • @willtollefson
      @willtollefson  4 หลายเดือนก่อน

      Thanks for the question! I glossed over that part in the video. The reason it’s doing that is because there needs to be a way to look at the status of the 1000 requests asynchronously and the way I implemented it was a status thread that starts executing after you construct the Server object. It could have instead been a getter that gets called periodically after the requests start submitting, but with the code as written if it weren’t done in a separate thread, the executor block would never be hit because the main class would have been blocked after Server constructor if that private method was called from in the constructor with the same thread. Hope this helps!

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

    Thank you! Really simple it seems, haven't had to use one yet until now for my personal projects, and it seems like the Semaphores meet my needs easily. I was worried that I would've needed something more complex. Did you ever get around to making that lock video? I am going to be watching some of your other concurrency videos soon though to see what the other solutions look like.

    • @willtollefson
      @willtollefson  7 หลายเดือนก่อน

      That lock video is on my short list right now of future videos to make. There are multiple flavors of locks - if there's a particular thing you want me to cover in that video, let me know!

  • @ajaybiswal1
    @ajaybiswal1 8 หลายเดือนก่อน +1

    Nice concept. Please make videos on locks

    • @willtollefson
      @willtollefson  8 หลายเดือนก่อน

      Thanks for the comment - I'll add this to my list of videos to make!

  • @PragmatikPlus
    @PragmatikPlus 8 หลายเดือนก่อน +1

    great video