[Python.NET] [Python.Net] AcquireLock deadlock while calling Python from C#

AwareMan awareman at gmail.com
Fri Dec 3 10:46:28 CET 2010


Hi,

sorry for the two posts, i was not sure if the mailing list server would let
the first one be sent as this address wasn't registered :x

I finally managed to solve the issue, and I'm a bit ashamed of the
trivialness of the solution but well, it may help someone someday. The
difference between the two executions was that as calculation is higly
parallelized, the BeginAllowThread() method had to be called at start...
Thought that using AcquireLock and ReleaseLock would be enough in order to
ensure thread safety, but that's not the case. Also, EndAllowThread has to
be called when stopping to use the PythonEngine, not on a perrequest basis.

Now, this is working just great :)

Best regards,
Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20101203/dd27de72/attachment.html>


More information about the PythonDotNet mailing list