Differences between revisions 4 and 32 (spanning 28 versions)
Revision 4 as of 2007-10-16 16:31:42
Size: 1204
Editor: c-71-228-235-214
Comment:
Revision 32 as of 2014-05-11 00:38:28
Size: 707
Editor: FConover
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
In CPython, the '''global interpreter lock''', or '''GIL''', is a mutex that prevents multiple native threads from executing Python bytecodes at once. This lock is necessary mainly because CPython's memory management is not thread-safe. (However, since the GIL exists, other features have grown to depend on the guarantees that it enforces.)

CPython extensions must be GIL-aware in order to avoid defeating threads. For an explanation, see [http://docs.python.org/api/threads.html Global interpreter lock].

The GIL is controversial because it prevents multi-threaded CPython programs from taking full advantage of multiprocessor systems in certain situations. Note that potentially blocking or long-running operations, such as I/O, image processing, and NumPy number crunching, happen ''outside'' the GIL. Therefore it is only in multi-threaded programs that spend a lot of time inside the GIL, interpreting CPython bytecode, that the GIL becomes a bottleneck.

----

One of IronPython's delights is that it works around
the GIL; IronPython-based applications can be fully-threaded
in the sense that they properly exploit multi-core CPUs.

[Mention place of GIL in StacklessPython.]
[[HTML(<iframe src="http://www.veoh.com/static/swf/veoh/SPL.swf?videoAutoPlay=0&permalinkId=v71645118n5kd3ejb" width="510" height="510"></iframe>)]]As a Remodeling expert for upwards of 36 yrs I come equipped with significant amounts of ability and know-how. I've received various honors in my work. Recently I have switched my aim to employing my many yrs of expertise to helping other people through the remodeling process. Whether you happen to be a DIY'er or even an industry professional I could benefit you on your next project. If you want the most effective, most recent how-to's on Home Improvement there is only one destination to go http://ec2-23-23-174-86.compute-1.amazonaws.com/profile/joohf

HTML(<iframe src="http://www.veoh.com/static/swf/veoh/SPL.swf?videoAutoPlay=0&permalinkId=v71645118n5kd3ejb" width="510" height="510"></iframe>)As a Remodeling expert for upwards of 36 yrs I come equipped with significant amounts of ability and know-how. I've received various honors in my work. Recently I have switched my aim to employing my many yrs of expertise to helping other people through the remodeling process. Whether you happen to be a DIY'er or even an industry professional I could benefit you on your next project. If you want the most effective, most recent how-to's on Home Improvement there is only one destination to go http://ec2-23-23-174-86.compute-1.amazonaws.com/profile/joohf

GlobalInterpreterLock (last edited 2020-12-22 21:57:53 by eriky)

Unable to edit the page? See the FrontPage for instructions.