Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Scaling on multi-processor machine

Reply
Thread Tools

Scaling on multi-processor machine

 
 
Atul Kshirsagar
Guest
Posts: n/a
 
      05-21-2004
Hello,
GIL prevents my C++ application embedding and extending python to scale even
though I spawn multiple C++ threads. I read lot of references on internet
about using multiple processes rather than threads.

In that direction I was searching for some examples/resources/tools which
can help me create multi-process implementation. My application does need to
pass userdefined class objects to python interpreter. So I guess my
implementation is going to need a protocol to marshal, de-marshal python
objects between processes or use shared memory.

Does anyone here know of any examples/tools to implement the multi-processes
approach with the object/data transfer between the processes ?

> Atul Kshirsagar
>


 
Reply With Quote
 
 
 
 
Aahz
Guest
Posts: n/a
 
      05-21-2004
In article <(E-Mail Removed)>,
Atul Kshirsagar <(E-Mail Removed)> wrote:
>
>GIL prevents my C++ application embedding and extending python to scale even
>though I spawn multiple C++ threads. I read lot of references on internet
>about using multiple processes rather than threads.


You're not getting any scaling, or you're not getting enough scaling?
--
Aahz ((E-Mail Removed)) <*> http://www.pythoncraft.com/

Adopt A Process -- stop killing all your children!
 
Reply With Quote
 
 
 
 
Dieter Maurer
Guest
Posts: n/a
 
      05-23-2004
In article <(E-Mail Removed)>,
Atul Kshirsagar <(E-Mail Removed)> wrote:
>GIL prevents my C++ application embedding and extending python to scale even
>though I spawn multiple C++ threads. I read lot of references on internet
>about using multiple processes rather than threads.


While your C++ threads are not touching Python objects, they
can release the GIL (but must acquire it again before they touch Python
objects, e.g. call into Python).

Thus, you can have your C++ threads work in parallel as long as
they do not touch Python objects.

Dieter
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox width scaling to width of data not width of page? AndrewF ASP .Net 1 10-10-2005 04:38 PM
Page & Control Scaling? =?Utf-8?B?REVXcmlnaHRfQ0E=?= ASP .Net 1 05-26-2005 05:57 AM
Control Scaling??? =?Utf-8?B?REVXcmlnaHRfQ0E=?= ASP .Net 3 04-28-2005 07:54 AM
Control Scaling??? =?Utf-8?B?REVXcmlnaHRfQ0E=?= ASP .Net 1 04-27-2005 03:19 AM



Advertisments