Let Concurrency Be Free

Keynote
Shanghai
2:50 p.m. - 3:30 p.m.
Venue A(Integrated Building, Room 506 Lecture Hall)
  • Hongfu Wang Backend Engineer

    Speaker at PyCon China 2023/2024/2025.

    wanghongfu

Abstract

A systematic exploration of concurrent runtimes, data-sharing boundaries, and the evolution of structured concurrency paradigms.

Details

On the eve of the Python 3.15 release, the focus of discussions around Python concurrency is shifting from “can we truly take advantage of multiple CPU cores?” to “now that execution capabilities are being unlocked, how should we reorganize tasks, data, and causal relationships?”

This talk will trace the evolution of GIL, threading, multiprocessing, concurrent.futures, generators, coroutines, and asyncio along three main threads: the CPython runtime, the standard library, and programming paradigms. Starting from structured programming, we will then explore structured concurrency—bringing control flow, task lifecycles, cancellation, exceptions, and context back together within clear scopes.

We will then compare the two paths of subinterpreters and free-threading, examining the trade-offs among sharing, isolation, data-transfer costs, and extension compatibility in PEP 684, PEP 734, and PEP 703. We will also look at PEP 805 to explore how CPython is rebuilding data boundaries through immutability, ownership, and fine-grained synchronization.

Finally, the talk will look ahead to the next stage through bocpy and experiments in declarative concurrency: developers declare resources and dependencies, while the runtime derives the degree of parallelism and execution order. As the global lock gradually fades away, Python needs to establish a new contract between freedom of execution and order of data.

Free computation, bounded data. Let’s embrace concurrency, freely.