Python Tutorial - 29. Sharing Data Between Processes Using Multiprocessing Queue

preview_player
Показать описание
The topics incorporated in the video are how to share data between processes using multiprocessing queue in python with appropriate examples, what is queue, how to create a queue, method of queue and classes of queue, how to communicate between two process in python, how to use “queue” to store results of square function, how to create queue variable in Multiprocessing Queue class, what is queue class method put(), what is Queue data structure FIFO, what is the difference between multiprocessing queue and queue module and the use of queue class method empty() as well as get().

Topics that are covered in this Python Video:
0:00 How to share data between processes using multiprocessing queue in python
0:15 Example
1:40 How to communicate between two processes in python
2:06 Use "queue" to store results of the square function
2:17 create queue variable in Multiprocessing Queue class
2:55 Queue class method put()
2:58 What is Queue data structure FIFO(First In First Out)
3:30 Queue class method empty(), get()
5:11 Difference between Multiprocessing queue vs queue module

Next Video:

Рекомендации по теме
Комментарии
Автор

This is really great, especially the last part about the differences between multiprocessing.Queue() and the standard queue module. Really appreciate this.

jimmycheong
Автор

If you are watching this video without coding along, you are wrong! Stop and code with him so you can truly learn the material.

etorty_dev
Автор

Wow! Really loved this video, this just clarified my one doubt!

jeeveshsinghroa
Автор

Sorry that i cant say this on all your vids but. They are fucking good and get the message right. Very very understandable and one of the only ones that is on this level. Keep posting haha

TheLazyClips
Автор

Thanks so much for all your multiprocessing tutorials!

sofoo
Автор

Thank you so much! Liked & subscribed!

patrickmueller
Автор

Nice tutorial thanks for it !
On a side note, as a substitute to "if queue.empty(): is False" could be "if not queue.empty(): "

anuragbisht
Автор

Excellent tutorial. Thank you very much!

trumberak
Автор

while not q.empty() should be easier to read, nice tutorial

openrijal
Автор

sir I appreciate your effort in putting this out

nxxxxzn
Автор

Thanks for the tutorials! They are very well designed and moduled. I had a question on this one - Is there any specific advantage of using shared queues instead of shared arrays?

AkhileshGotmare
Автор

I like your videos- thank you for knowledge sharing

jigneshcisco
Автор

instead of
while q.empty() is not False
it's better to use :
while not q.empty()

abdelghafourfid
Автор

Thank you so much this helped me a lot.

adnanqureshi
Автор

Could you please put a lesson of in-depth understanding of subprocess.popen

TuneAndPlay
Автор

When you also add the memory ref in print statement: f'outside process: {result}. Memory ref: {id(result)}', then in your example `result` has the same memory address inside of the method and in the __main__, meaning they are pointing to the same thing. So I do not understand how they are not sharing the memory if they are pointing to the same variable in memory?

Naz-pkll
Автор

Hi, very good video, would like to know about data sharing using Manager. Hope you can make a video on that... for some reason I I have to use manager.list() to share data between processes, but it seems the data cannot shared to a function that inside a class...

maplefoongdoi
Автор

What if I'm not trying to process to a queue, but rather from a queue. I want the arguments my process sends to the function to be gotten from my queue

nicholasrogers
Автор

hello,
i have array 128x128 each pixel has 16 byte, i won to encrypt it so it take a long time . i would like to use multiprocessing in python to reduces encryption time . so, how can run that . for simple, i would like to take one input on one function, but with multiprocessing.

alaakailah
Автор

Thank you for all of your excellent videos. Much appreciated. Quick question (but maybe long answer): I wrote a program and made an interface with PyQt5. While the program is running, the interface is not responsive, until the program finishes. Would the solution be multiprocessing?

officesuperhero