IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Does this effect only the C API's?
Seems like being able to mark things as threadsafe (or unsafe) would be the way to go.
New It already does that for a good chunk of C code
The GIL only locks the interpretation of Python bytecodes. So any C call can potentially release the GIL (and make that thread wait for the call to finish, at which point it reacquires the lock and proceeds). I/O is a pretty common use case for this. Note too, that each process has its own GIL.
New Not quite.
The GIL locks the access of Python objects as well as the interpretation of the byte codes. So to do any real work with Python in C you still have to obtain the lock. It's basically cooperative multi-tasking.

Additionally, if you create a thread in C, you have to set up a bunch of Python thread bookkeeping structures that will be used by the interpreter as well.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     Python 2.4 final is out and has a new subprocess module - (FuManChu) - (8)
         Does it work with eudora2mbox.py? Yes, it does. Grr.... - (Another Scott)
         They need to get rid of the global interpreter lock -NT - (admin) - (6)
             Feel free to submit a patch ;) -NT - (FuManChu) - (2)
                 I don't need to. - (admin) - (1)
                     Multiprocess is indeed the way to go - (FuManChu)
             Does this effect only the C API's? - (ChrisR) - (2)
                 It already does that for a good chunk of C code - (FuManChu) - (1)
                     Not quite. - (admin)

Everyone sing a song about popcorn!
34 ms