Simon Willison’s Weblog

Subscribe

6 items tagged “threading”

2024

Free-threaded CPython is ready to experiment with! The Python 3.13 beta releases that include a "free-threaded" version that removes the GIL are now available to test! A team from Quansight Labs, home of the PyData core team, just launched py-free-threading.github.io to help document the new builds and track compatibility with Python's larger ecosystem.

Free-threading mode will not be enabled in Python installations by default. You can install special builds that have the option enabled today - I used the macOS installer and, after enabling the new build in the "Customize" panel in the installer, ended up with a /usr/local/bin/python3.13t binary which shows "Python 3.13.0b3 experimental free-threading build" when I run it.

Here's my TIL describing my experiments so far installing and running the 3.13 beta on macOS, which also includes a correction to an embarrassing bug that Claude introduced but I failed to catch!

# 12th July 2024, 11:42 pm / concurrency, gil, python, threading

2021

The GIL and its effects on Python multithreading (via) Victor Skvortsov presents the most in-depth explanation of the Python Global Interpreter Lock I’ve seen anywhere. I learned a ton from reading this.

# 29th September 2021, 5:23 pm / concurrency, gil, python, threading

2018

Intro to Threads and Processes in Python (via) I really like the diagrams in this article which compares the performance of Python threads and processes for different types of task via the excellent concurrent.futures library.

# 19th April 2018, 6:32 pm / multiprocessing, python, threading

2009

Introducing Yardbird. I absolutely love it—an IRC bot built on top of Twisted that passes incoming messages off to Django code running in a separate thread. Requests and Response objects are used to represent incoming and outgoing messages, and Django’s regex-based URL routing is used to dispatch messages to different handling functions based on their content.

# 22nd May 2009, 11:13 pm / django, irc, regular-expressions, threading, twisted, yardbird

jessenoller.com—python magazine. Jesse Noller has been sharing his articles originally published in Python Magazine. Topics include SSH programming with Paramiko, context managers and the with statement and an excellent explanation of Python’s threading support and the global interpreter lock.

# 5th February 2009, 11:10 pm / contextmanagers, gil, jessenoller, paramiko, python, pythonmagazine, ssh, threading

2007

Thread Synchronization Mechanisms in Python. Locks, RLocks, Semaphores, Events and Conditions as explained by Fredrik Lundh.

# 29th July 2007, 9:32 pm / conditions, effbot, events, fredrik-lundh, locks, python, rlocks, semaphores, threading, tutorial