xmlrpc idea for getting around the GIL

P

Patrick Stinson

Has anyone every tried wrapping the CPython lib into a daemon with an
RPC mechanism in order to move the GIL out of the process? I have
multiple audio threads, each of which use the python interpreter but
don't have to interact with each other and can might as well use a
separate interpreter handled by a daemon with libpython linked in.

I've never used a C xmlrpc lib before and would probably need to set
up some shared memory to get it to work. Can anyone suggest a library
out there that would at do that sort of thing, maybe with some
cross-platform process management?

I imagine this is how the multiprocessing module works.
 
A

Antoine Pitrou

Le Tue, 24 Nov 2009 02:53:30 -0800, sturlamolden a écrit :
It does not.

Actually, it is how multiprocessing works under Windows (for lack of the
fork() function), except that it uses pickle by default (but it does have
xmlrpc support).

Regards

Antoine.
 
S

sturlamolden

Actually, it is how multiprocessing works under Windows (for lack of the
fork() function), except that it uses pickle by default (but it does have
xmlrpc support).

Windows does not have daemons, so this is obviously incorrect. (There
are something called Windows Services, but multiprocessing does not
use them.)

Multiprocessing on Windows uses the subprocess module.
 
A

Antoine Pitrou

Le Tue, 24 Nov 2009 09:27:24 -0800, sturlamolden a écrit :
Windows does not have daemons, so this is obviously incorrect. (There
are something called Windows Services, but multiprocessing does not use
them.)

This is nitpicking. Technically it might not be a daemon but it's used as
such.
The important point is that it does use a (custom) form of RPC through
marshalling, which is what the original question was about.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top