# Python, Threads and the Global Interpreter Lock (GIL)

DevFeed: [Python, Threads and the Global Interpreter Lock (GIL)](<https://devfeed.tech/articles/python-threads-and-the-global-interpreter-lock-gil-31814.md>)

Original publisher: [Read original article](<https://www.metachris.dev/2010/10/python-threads-and-the-global-interpreter-lock-gil/>)

Author: Chris Hager

Published: 2010-10-13T00:00:00Z

Content type: article

Language: en

Sources: [Chris Hager](<https://devfeed.tech/sources/chris-hager.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [cpu](<https://devfeed.tech/topics/cpu.md>)

Tags: [cpu](<https://devfeed.tech/tags/cpu.md>), [process](<https://devfeed.tech/tags/process.md>), [python](<https://devfeed.tech/tags/python.md>), [threads](<https://devfeed.tech/tags/threads.md>)

## AI overview

This article explains Python threads, multiprocessing, and the Global Interpreter Lock (GIL). It states that threads share one Python interpreter process and cannot use more than one CPU for CPU-intensive code, while multiprocessing can use multiple CPUs by starting separate interpreter processes.

## Source excerpt

This post is about Python, Threads, Multiprocessing, the GIL, and a great talk by David Beazley titled "Inside the Python GIL". Threads Threads make it possible to execute multiple pieces of code in parallel, which means either utilizing multiple processors or having the operating system schedule execution time for the threads sequentially on one processor. In contrast to multiprocessing (forking) where multiple separated processes are started, all threads run in a single process and have access to the same resources.