Python 3 - Episode 53 - Producer and consumer

preview_player
Показать описание
In this video series we will cover Python 3. In this video we will look communicating between threads, and how to use the queue.

Python 3 youtube videos by Bryan Cairns

Intro: (0:00)
Imports: (0:46)
Functions: (1:22)
Producer: (2:38)
Consumer: (5:33)
Main Function: (8:15)
Outro: (13:55)
Рекомендации по теме
Комментарии
Автор

Great video, captured the essence of threading with producer and consumer pattern in such simple way.

TheAshutoshBhardwaj
Автор

excellent video, it's just what i was looking for to understand a bit about producer and consumer with thread and multi process, thanks again and congratulations, you have gained a subscriber jaja and a like

daqa
Автор

This was exactly what i needed, thank you so much friend!

FilipeProKiller
Автор

How would you do How you will do it using Futures ?

What are you will do when you have multiple producers - consumers ?

liorbm
Автор

This was great! Can you please cover thread condition variables as well?

redjr
Автор

Thank you! Could you Maybe Send the Import Copy and Paste?

AsianKriss
Автор

How can we make each thread a producer and consumer both?

nandiniagrawal
Автор

I understand the work queue, but the finished queue seems to have an issue. When using get() wouldn't that be removing the item from the finished queue? So let's say that the producer takes 5 minutes to add one item to work, but the consumer is faster, say 1 min to process. If the consumer finds the work queue is empty, but the producer isn't done producing yet, it will get a false from the finished queue, but the loop will go again and now, the finished queue is empty since .get() removed the False from the queue, but the producer isn't done either so it hasn't added the next item to the empty queue. Is my understanding correct, am I missing something?

Gabriel-oykw