Scaling on multi-processor machine

Discussion in 'Python' started by Atul Kshirsagar, May 21, 2004.

  1. 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
    >
     
    Atul Kshirsagar, May 21, 2004
    #1
    1. Advertising

  2. Atul Kshirsagar

    Aahz Guest

    In article <>,
    Atul Kshirsagar <> 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 () <*> http://www.pythoncraft.com/

    Adopt A Process -- stop killing all your children!
     
    Aahz, May 22, 2004
    #2
    1. Advertising

  3. In article <>,
    Atul Kshirsagar <> 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
     
    Dieter Maurer, May 23, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shiv Kumar
    Replies:
    20
    Views:
    3,170
    Shiv Kumar
    Jan 15, 2004
  2. Anton Berg
    Replies:
    0
    Views:
    423
    Anton Berg
    Jan 16, 2006
  3. Replies:
    38
    Views:
    1,323
    Dennis Lee Bieber
    Feb 15, 2005
  4. Replies:
    15
    Views:
    579
    Jorgen Grahn
    Apr 24, 2007
  5. brahatha
    Replies:
    1
    Views:
    685
Loading...

Share This Page