Threads vs Async: Has Asyncio Solved Concurrency?

Speaker: Jacob Unna

Track: Web

Type: Talk

Room: Video Room 2

Time: Oct 08 (Thu): 14:45

Duration: 0:45

In recent years asyncio has garnered much attention as a faster and easier alternative to threads. So do threads still have a place in the world? And what of other concurrency tech such as greenlets?

The fundamental problem solved by both async frameworks and threads is one of scheduling. This talk will put aside nitty gritty implementation details and go back to basics, examining how a cooperative scheduler (used by async frameworks) differs from a preemptive scheduler (used by threads). This basic understanding will clarify what is often considered a tricky subject and shed light on the pros and cons of each approach.

We will also see that even having decided on the async model, asyncio is not the only tool available. We will explore the pros and cons of greenlets, curio and trio as alternatives to the standard library's solution.

This talk is suitable for all levels from beginner to expert. The format will be simple and intuitive, with basic live examples of how to use threads and asyncio to do everyday tasks. You will come away not with an encyclopaedic knowledge of a specific toolchain, but with a deeper appreciation of the core concepts that power concurrency.