"Shared Queue" Section 3.4 of online text: Parallel Computing for Beginners
Chapter in a Book
In this section, we will see how to make a process and how to communicate between processes via a shared queue. Recall that a queue is a first-in-first-out (FIFO) data structure. The queue is shared in that each process has access to the same queue structure. The Python multiprocessing module uses the shared queue data structure to allow processes to pass messages to each other.
After giving an overview of the Python multiprocessing module, we will then practice computing the greatest common divisor (GCD) of many pairs of numbers through an unplugged activity, and finally develop code using the multiprocessing module to perform this task more quickly with parallelism.
Bogaerts, S. 2021. Shared Queue. Section 3.4 of online text Parallel Computing for Beginners. https://pdcbook.calvin.edu/PDCBeginners/index.html. Text supported through National Science Foundation (NSF) Collaborative Research Grants DUE-1822480/1822486/1855761 (PIs: Joel Adams, Richard Brown, Suzanne Matthews, Libby Shoop).