On Wed, Jun 8, 2011 at 2:11 PM, Jason Tackaberry <t...@urandom.ca> wrote:
> On 11-06-07 07:29 PM, Tom Brown wrote:
>
>> Any suggestions will be appreciated.
>>
>
> Why are you calling PyEval_ReleaseLock() in the CmdThread constructor?
>  This looks suspicious.
>
> Also, I don't see where CmdThread::lock() and CmdThread::unlock() are being
> invoked in your example.  Relics from your effort to create a reduced
> testcase I assume?
>
>
Jason,

I found that PyEval_ReleaseLock() was necessary to keep the program from
hanging. The lock() and unlock() methods were used in a previous attempt to
lock/unlock the GIL.

I kept banging at this and finally gave up on the GIL. I used a mutex
instead. This allowed me to get rid of the Python API calls that dealt with
the GIL. It works great in the test program. I'll find out how well it
performs in the real program.

Thanks!
Tom
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to