migrating processess to avoid the GIL

Aaron "Castironpi" Brady castironpi at gmail.com
Sat Sep 20 01:03:36 EDT 2008


On Sep 19, 6:40 pm, "Patrick Stinson" <patrickstinson.li... at gmail.com>
wrote:
> I need to migrate calls to CPython to another process in my C++ app to
> get around the GIL. Does anyone know of a good way to do this on
> windows and Mac? All calls and callbacks can be blocking, I just need
> to share some data structures.
>
> Cheers

You should look into 'mmap' and 'struct'.  mmap shares memory between
processes, and is a random-access read-write file buffer.  struct
packs data from primitive types (integers, floats, & short strings)
into a buffer.

If you need advice on structuring your shared file, feel free to write
back.



More information about the Python-list mailing list