Python Threads and C Semaphores

Dejan Rodiger dejan.wirusrodiger at ck.t-com.hr
Tue Jan 16 09:08:32 CET 2007


Jeremy said the following on 16.1.2007 8:27:
> Hello,
> 
> I have a fat C++ extension to a Python 2.3.4 program. In all, I count
> five threads. Of these, two are started in Python using
> thread.start_new_thread(), and both of these wait on semaphores in the C++
> extension using sem_wait(). There also are two other Python threads and one 
> thread running wholly in
> the extension.
> 
> I notice that when one of the Python threads calls the extension and waits
> on a semaphore, all but the C++ thread halt even when not waiting on any
> semaphore. How do we get this working right?

Check the Global Interpreter Lock

-- 
Dejan Rodiger - PGP ID 0xAC8722DC
Delete wirus from e-mail address



More information about the Python-list mailing list