Q:

How can I share a Queue between processes in Python?

I know there is a Value type could allocate shared memory, but seems it could only contains basic c types.
Is there anyway allow us to pass complex data types like Queue/Map between processes ?

A:

Use Managers. Create a Manager object, then invoke manager.Queue (for example) to create a sharable Queue proxy. You can then pickle the returned proxy object and pass that between processes.

