FAQ
Hi,


I am embedding Python into a multi-threaded C++ application running on
Solaris and need urgent clarification on the embedding architecture and
its correct usage (as I am experience weird behaviors).


Can anyone clarify:


- if Python correctly supports multiple sub-interpreters
(Py_NewInterpreter) ?


- if Python correctly supports multiple thread states per
sub-interpreter (PyThreadState_New) ?


and the "real" question:


- what is the rationale for choosing one of:


[a] one sub-interpreter with many thread states
[b] many sub-interpreters with one thread state each
[c] many sub-interpreters with many threas states each


Thanks for helping
Alan

Search Discussions

  • Adsheehan at Aug 17, 2005 at 12:23 pm
    Does anyone have advice on other groups, sites etc that has knowledge
    of this subject ?

    Thanks
  • Michael Hudson at Aug 17, 2005 at 4:24 pm

    adsheehan at eircom.net writes:

    Does anyone have advice on other groups, sites etc that has knowledge
    of this subject ?
    I've just replied to your original post, having not seen it the first
    time around.

    Cheers,
    mwh

    --
    <Nafai> w00t w00t w00t w00t!
    <Nafai> I don't understand all of the code, but it works!
    <Nafai> I guess I should check it in.
    -- from Twisted.Quotes
  • Michael Hudson at Aug 17, 2005 at 4:23 pm

    adsheehan at eircom.net writes:

    Hi,


    I am embedding Python into a multi-threaded C++ application running on
    Solaris and need urgent clarification on the embedding architecture and
    its correct usage (as I am experience weird behaviors).
    What version of Python are you using?
    Can anyone clarify:


    - if Python correctly supports multiple sub-interpreters
    (Py_NewInterpreter) ?
    It's supposed to but it's not often used or tested and can get a bit
    flaky.
    - if Python correctly supports multiple thread states per
    sub-interpreter (PyThreadState_New) ?
    There are bugs in 2.3.5 and 2.4.1 in this area (they are fixed in CVS
    -- I hope -- and will be in 2.4.2).
    and the "real" question:


    - what is the rationale for choosing one of:


    [a] one sub-interpreter with many thread states
    This is the best tested and understood (it's what the core Python
    interpreter does, after all).
    [b] many sub-interpreters with one thread state each
    [c] many sub-interpreters with many threas states each
    These are probably somewhat broken in recent Python's, I'm afraid.
    Can you try CVS?

    Cheers,
    mwh

    --
    ARTHUR: Yes. It was on display in the bottom of a locked filing
    cabinet stuck in a disused lavatory with a sign on the door
    saying "Beware of the Leopard".
    -- The Hitch-Hikers Guide to the Galaxy, Episode 1
  • Adsheehan at Aug 23, 2005 at 9:44 am
    Thanks Michael.

    I will look into the areas you have suggested...

    Alan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedAug 16, '05 at 11:54p
activeAug 23, '05 at 9:44a
posts5
users2
websitepython.org

2 users in discussion

Adsheehan: 3 posts Michael Hudson: 2 posts

People

Translate

site design / logo © 2022 Grokbase