global interpreter lock

Discussion in 'Python' started by Tommy.Ryding@gmail.com, Oct 18, 2005.

  1. Guest

    I just need confirmation that I think right.

    Is the files thread_xxx.h (xxx = nt, os2 or whatever) responsible for
    the
    global interpreter lock in a multithreaded environment?

    I'm currently writing my own thread_VW for VxWorks, thats why I'm
    asking.

    //Tommy
    , Oct 18, 2005
    #1
    1. Advertising

  2. Jeremy Jones Guest

    wrote:

    >I just need confirmation that I think right.
    >
    >Is the files thread_xxx.h (xxx = nt, os2 or whatever) responsible for
    >the
    >global interpreter lock in a multithreaded environment?
    >
    >I'm currently writing my own thread_VW for VxWorks, thats why I'm
    >asking.
    >
    >//Tommy
    >
    >
    >

    Someone can correct me if I'm wrong, but the lock actually lives in
    ceval.c, around here:



    802 PyThread_release_lock(interpreter_lock);
    803
    804 /* Other threads may run now */
    805
    806 PyThread_acquire_lock(interpreter_lock, 1);


    This was taken from what appears to be a 2.4.1 release rather than a CVS
    checkout. It looks like the PyThread_type_lock is defined in the
    thread_xxx.h files, though.

    HTH,

    - jmj
    Jeremy Jones, Oct 18, 2005
    #2
    1. Advertising

  3. Guest

    Thanks,
    PyThread_release_lock() is implemented in all thread_xxx.h files.

    So I thought right but specified my question like a stupid ;)

    //T
    , Oct 19, 2005
    #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. Aahz
    Replies:
    0
    Views:
    943
  2. Fuzzyman
    Replies:
    3
    Views:
    477
    Andrew MacIntyre
    Dec 5, 2003
  3. Tomas Christiansen

    Global Interpreter Lock

    Tomas Christiansen, Sep 24, 2004, in forum: Python
    Replies:
    3
    Views:
    299
    Michael Hoffman
    Sep 24, 2004
  4. Paul Rubin

    global interpreter lock

    Paul Rubin, Aug 19, 2005, in forum: Python
    Replies:
    59
    Views:
    1,282
    Michael Sparks
    Sep 15, 2005
  5. Duncan Grisby
    Replies:
    0
    Views:
    279
    Duncan Grisby
    Nov 18, 2005
Loading...

Share This Page