Part IV: Multiprocessing and IPC
4.1. Implement work(...). This function gets data from the queue which can be:
- an
Iterable[Iterable[str]]e.g. [("A", "C"), ("K"), ("L", "B", "F")]
None if the process must stop because there is no more data
4.2. In __main__, create a process Manager and a Queue to exchange data. Put the jobs to the queue and then a None for each worker.
4.3. In __main__, create a Pool(4) for 4 workers and map or startmap the processes to the data from the queue.
4.4. Once all processes eventually closed, get the final best result before exiting
5.4. Restore all 26 stocks in the JSON file and test.
Expected result: Best is earning 10146 for 499 spent (~ 1'30 to 4' for 1 to 4 CPUs)