Embedding threaded Python

Discussion in 'Python' started by Ricardo, Apr 12, 2005.

  1. Ricardo

    Ricardo Guest

    If I embed Python in a C app and the Python code is threaded, but the C
    code isn't, do I need to call PyEval_InitThreads() ? - or do you only need
    to do that if the C code is threaded ?
    Ricardo, Apr 12, 2005
    #1
    1. Advertising

  2. Ricardo

    Tom Cocagne Guest

    You only need to call PyEval_InitThreads() for multithreaded C-code. The
    Python threads operate on a different principle.

    Tom

    Ricardo wrote:

    > If I embed Python in a C app and the Python code is threaded, but the C
    > code isn't, do I need to call PyEval_InitThreads() ? - or do you only need
    > to do that if the C code is threaded ?
    Tom Cocagne, Apr 13, 2005
    #2
    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. Harri Pesonen

    Re: Embedding Python in multi-threaded app

    Harri Pesonen, Sep 4, 2003, in forum: Python
    Replies:
    0
    Views:
    822
    Harri Pesonen
    Sep 4, 2003
  2. Jesper Nilsson

    Embedding Python in a threaded app

    Jesper Nilsson, Nov 3, 2003, in forum: Python
    Replies:
    0
    Views:
    244
    Jesper Nilsson
    Nov 3, 2003
  3. Mustafa Demirhan
    Replies:
    0
    Views:
    294
    Mustafa Demirhan
    Nov 9, 2004
  4. Mustafa Demirhan
    Replies:
    0
    Views:
    271
    Mustafa Demirhan
    Nov 9, 2004
  5. Mustafa Demirhan
    Replies:
    0
    Views:
    594
    Mustafa Demirhan
    Nov 9, 2004
Loading...

Share This Page