Queues & Pipes
This lesson discusses constructs that can be used for inter-process communication.
We'll cover the following...
Queues & Pipes
There are two ways that processes can communicate between themselves:
Queues
Pipes
Queues
The multiprocessing module offers three types of queues which are all FIFO structures based on the queue
module's Queue (queue.Queue) implementation in the standard library. These
are:
Simple Queue
Queue
Joinable Queue ( a subclass of Queue)
The queues in the multiprocessing module can be shared among multiple processes. Remember the following:
We can enqueue any element in the queue that is picklable.
Queues are thread and process safe.
If multiple processes enqueue objects at the same time in a queue, the receiver may receive them out of order. ...