Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 1 | |
| 2 | :mod:`autoGIL` --- Global Interpreter Lock handling in event loops |
| 3 | ================================================================== |
| 4 | |
| 5 | .. module:: autoGIL |
| 6 | :platform: Mac |
| 7 | :synopsis: Global Interpreter Lock handling in event loops. |
Benjamin Peterson | 2368193 | 2008-05-12 21:42:13 +0000 | [diff] [blame] | 8 | :deprecated: |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 9 | .. moduleauthor:: Just van Rossum <just@letterror.com> |
| 10 | |
| 11 | |
| 12 | The :mod:`autoGIL` module provides a function :func:`installAutoGIL` that |
Georg Brandl | e7a0990 | 2007-10-21 12:10:28 +0000 | [diff] [blame] | 13 | automatically locks and unlocks Python's :term:`Global Interpreter Lock` when |
| 14 | running an event loop. |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 15 | |
Benjamin Peterson | 2368193 | 2008-05-12 21:42:13 +0000 | [diff] [blame] | 16 | .. warning:: |
| 17 | |
| 18 | This module is removed in 3.0. |
| 19 | |
Georg Brandl | 8ec7f65 | 2007-08-15 14:28:01 +0000 | [diff] [blame] | 20 | |
| 21 | .. exception:: AutoGILError |
| 22 | |
| 23 | Raised if the observer callback cannot be installed, for example because the |
| 24 | current thread does not have a run loop. |
| 25 | |
| 26 | |
| 27 | .. function:: installAutoGIL() |
| 28 | |
| 29 | Install an observer callback in the event loop (CFRunLoop) for the current |
| 30 | thread, that will lock and unlock the Global Interpreter Lock (GIL) at |
| 31 | appropriate times, allowing other Python threads to run while the event loop is |
| 32 | idle. |
| 33 | |
| 34 | Availability: OSX 10.1 or later. |
| 35 | |