[Python.NET] Python 2.4 hang when calling .NET dll function

Brian Lloyd brian at zope.com
Fri Mar 25 15:35:23 CET 2005

> >My test application (singlethreaded) ran great, but when integrating the
> >python module that uses the .NET DLLs in a multithreaded 
> program, one call
> >to a .NET function just hangs. All threads are hanging, and I get no
> >response using CTRL+C.
> >
> >I have debugged my application using ntsd, and I do not see any bad
> >behaviour from my called DLLs. Are there some issues with 
> locking/unlocking
> >mechanism when calling functions from .NET DLLs ?
> >  
> >
> Yes there are...And I don't know if they are due to interaction between
> python and .net, or only to python.

There is definitely a problem in the way the bridge is handling 
the GIL (global interpreter lock) in multithreaded situations. 

I'm working right now on a beta 5 that re-vamps the GIL handling 
and hopefully takes care of these issues.

> I submitted a bug recently on python.org:
> http://sourceforge.net/tracker/index.php?func=detail&aid=1169108&g

Note that this is the Python bug tracker -- this issue is specific 
to Python for .NET, not the core CPython so it would be best to 
use the tracker at http://www.zope.org/Members/Brian/PythonNet/Collector/

Brian Lloyd        brian at zope.com
V.P. Engineering   540.361.1716              
Zope Corporation   http://www.zope.com 

More information about the PythonDotNet mailing list