On Sun, Dec 29, 2002, David Abrahams wrote: > > Python extension module B calls shared library Q and uses Q's callback > interface. Because some of the callbacks need to use the Python API, > and *might* be invoked by threads, they must all acquire the GIL. > Because they also might be invoked by direct calls into Q, B must > always release the GIL before calling anything in Q. So you're saying that the callback functions in B acquire the GIL? > Problem: using B while A is loaded breaks A: because B has installed > callbacks in Q that acquire the GIL, A must also release the GIL > before calling into Q. Why? The callbacks in B will simply hang until they acquire the GIL. I think this thread might be better handled on c.l.py, at least until it's understood well enough to be clear whether something does need to change in Python. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "There are three kinds of lies: Lies, Damn Lies, and Statistics." --Disraeli
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4