Java Multithreading Tutorial for Beginners #10: Producer consumer problem

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

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

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

    How to count total number of producer and consumer

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

    Why notify is used before checking if consumer has any data to consume or not

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

    naiese ackkcentch

  • @swarupcodes
    @swarupcodes 5 лет назад +4

    Hats off to the clarity.

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

    In which platform u are working or coding in video🤔 name?

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

    Surprisingly very easy to understand. Great tut.

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

    this code works for timeDate but if closely check then all 3 consumers are not consuming the same data... there sec value is always diff. I confirmed this by passing the int count value that producer produces... so still all 3 consumers are consumeing diff data.
    I copied ur code and tested.

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

    what if i have a timeout for each item the producer makes, and i want the consumers to print the item in the same order the items entered the queue? like the threads will have to wait for eachother

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

    Here the producer class contains the consume method.isn’t that wrong?

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

    What if I wanted to get data from a file? Would i do it in the producer thread then store that in the queue?

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

    Thank you very much

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

    Thank you very much!

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

    great stuff thanks!

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

    I did not understand where is the Problem here...