firstname.lastname@example.org (Martin v. Löwis) writes:
Ok. What would break if they wouldn't?
All of the places where Q invokes the callback on arbitrary threads it has started, but which don't hold the GIL.
So Q creates new threads which perform callbacks? But Q also performs the callbacks when invoked from A? Sounds like a bug in Q to me...
Why do you say that? Q doesn't know anything about Python or its constraints. Why should it be prohibited from invoking these callbacks in whatever way it deems appropriate for its problem domain? I know, I know, all library authors should design with Python in mind <wink>, but seriously, Q == Qt, a library that's used extensively and successfully by thousands. It's conceivable that this is a serious design flaw in Qt, but I'm inclined to disbelieve that. I think rather that this is a library design which doesn't interoperate well with Python's constraints on GIL manipulation. In this case, as Python is intended to be good for general interoperability, it seems like Python ought to budge if possible. -- David Abrahams email@example.com * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution