Free-Threading Migration Guide

Lightning
  • Xiaowei Lu Senior Software Engineer, Compiler Team, Alibaba Cloud

    Senior Software Engineer on the compiler team at Alibaba Cloud, with five years of experience in programming languages and runtime systems. Primary areas of work include Java memory management, application diagnostics and observability, and CPython's free-threaded runtime. Contributed to several open-source communities and projects, including OpenJDK, CPython, and Eclipse Jifa.

    lu-xiao-wei

Abstract

This talk discusses the issues involved in migrating existing applications to the free-threaded build: the code adaptations and thread safety work required, the expected performance gains and potential overhead, compatibility and upgrades of third-party libraries, and changes to the Python C API.

Details

The free-threaded feature was introduced in Python 3.14, providing Python with true concurrent programming capabilities by removing the global GIL lock. However, how should existing applications migrate to the free-threaded version? This talk will discuss these issues, such as: necessary code adaptations and thread safety. Expected performance improvements and potential performance overhead. Compatibility and upgrades of third-party libraries. Changes to the Python C API.