<div class="gmail_quote">On Wed, Jun 8, 2011 at 2:11 PM, Jason Tackaberry <span dir="ltr"><<a href="mailto:tack@urandom.ca">tack@urandom.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On 11-06-07 07:29 PM, Tom Brown wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Any suggestions will be appreciated.<br>
</blockquote>
<br>
Why are you calling PyEval_ReleaseLock() in the CmdThread constructor? This looks suspicious.<br>
<br>
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?<br><br></blockquote><div> <br>Jason,<br><br>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.<br>
<br>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.<br>
<br>Thanks!<br>Tom<br></div></div>