Jack Jansen | 1662162 | 2003-05-09 14:45:04 +0000 | [diff] [blame] | 1 | \section{\module{autoGIL} --- |
| 2 | Global Interpreter Lock handling in event loops} |
| 3 | |
| 4 | \declaremodule{extension}{autoGIL} |
| 5 | \platform{Mac} |
| 6 | \modulesynopsis{Global Interpreter Lock handling in event loops.} |
| 7 | \moduleauthor{Just van Rossum}{just@letterror.com} |
| 8 | |
| 9 | |
| 10 | The \module{autoGIL} module provides a function \function{installAutoGIL} that |
| 11 | automatically locks and unlocks Python's Global Interpreter Lock |
| 12 | when running an event loop. |
| 13 | |
| 14 | \begin{excdesc}{AutoGILError} |
| 15 | Raised if the observer callback cannot be installed, for example because |
| 16 | the current thread does not have a run loop. |
| 17 | \end{excdesc} |
| 18 | |
| 19 | \begin{funcdesc}{installAutoGIL}{} |
| 20 | Install an observer callback in the event loop (CFRunLoop) for the |
| 21 | current thread, that will lock and unlock the Global Interpreter Lock |
| 22 | (GIL) at appropriate times, allowing other Python threads to run while |
| 23 | the event loop is idle. |
| 24 | |
| 25 | Availability: OSX 10.1 or later. |
| 26 | \end{funcdesc} |