I need to read strings written by multiprocessing.Process instances from the main process. I already use Managers and queues to pass arguments to processes, so using the Managers seems obvious, but Managers do not support strings:
A manager returned by Manager() will support types list, dict, Namespace, Lock, RLock, Semaphore, BoundedSemaphore, Condition, Event, Queue, Value and Array.
How do I share state represented by a string using Managers from the multiprocessing module?
multiprocessing's Managers can hold Values which in turn can hold instances of the type c_char_p from the ctypes module:
For Python 3, use c_wchar_p instead of c_char_p
See also: Post with the original solution that I had a hard time finding.
So a Manager can be used to share a string beneath multiple processes in Python like this: