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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

AwareMan
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

_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet