blob: 7625be65a649139f4db2788bfeca4e595bee8a55 [file] [log] [blame]
Georg Brandl8ec7f652007-08-15 14:28:01 +00001
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.
8.. moduleauthor:: Just van Rossum <just@letterror.com>
9
10
11The :mod:`autoGIL` module provides a function :func:`installAutoGIL` that
Georg Brandle7a09902007-10-21 12:10:28 +000012automatically locks and unlocks Python's :term:`Global Interpreter Lock` when
13running an event loop.
Georg Brandl8ec7f652007-08-15 14:28:01 +000014
15
16.. exception:: AutoGILError
17
18 Raised if the observer callback cannot be installed, for example because the
19 current thread does not have a run loop.
20
21
22.. function:: installAutoGIL()
23
24 Install an observer callback in the event loop (CFRunLoop) for the current
25 thread, that will lock and unlock the Global Interpreter Lock (GIL) at
26 appropriate times, allowing other Python threads to run while the event loop is
27 idle.
28
29 Availability: OSX 10.1 or later.
30