Abstract
The Python standard library contains two important Future classes—concurrent.futures.Future and asyncio.futures.Future—used to hold the asynchronous results of processes/threads and coroutines, respectively.
In this talk, we'll begin by tracing the evolution of these two Future classes to clarify some common definitional questions:
How do we distinguish between the twins of parallelism and concurrency?
Why are concurrency and asynchronous operations always closely intertwined?
Next, we'll deepen our understanding of Python's core asynchronous concept—“coroutines”—by exploring these questions:
What are “stacked” and “stackless coroutines”? How are they implemented in Python?
Why is “goto harmful”? What is the intrinsic connection between “structured programming” and the “structured concurrency” paradigm?
Finally, we will explore the future potential and development direction of the Future module by examining upcoming Python features like “free threads” and “sub-interpreters.”