One thing that would eliminate the problem of the single GIL from our app would be to load and reload the libpython dll into a new address space within the same process. Our app is a plugin and the instances never have to talk to each other, so if we could simply load libpython into a new, duplicated address space each time we created an instance of our plugin, we would not have to worry about the GIL.

Has anyone ever heard of this sort of thing? The same thing could effectively be achieved by creating libpython31_1.dylib, libpython31_2.dylib, libpython31_3.dylib, libpython31_4.dylib, etc, and then loading them in order, but this seems kind of excessive.

What do you think? Stupid? Genius?

Please don’t post comments like “Use multiprocessing module”, or “Use process migration”. Believe me, I’ve looked at it and they won’t work for our app. If you want to know why, read this post: