Python threads question

Donn Cave donn at oz.net
Mon Aug 21 00:18:27 EDT 2000


Quoth "Makhno" <mak at imakhno.freeserve.co.uk>:
...
| It certainly looks as though I want to call the Py_BEGIN_ALLOW_THREADS
| everytime I call a function in my extension. This way, the threads can
| continue working while the GUI is being manipulated (or just blocking for
| user input).

Right, or anyway you must use it when the function will take any
significant amount of time to complete.

Then if there are any external callbacks, such as for example
a function that might be called from a graphic interface dispatch
loop, before calling back into the interpreter you must acquire
the interpreter lock.

	Donn Cave, donn at oz.net



More information about the Python-list mailing list