WeAreDevelopers LIVE • Oct 5, 2022

Concurrency in Python

Fabian Schindler

Is your Python app struggling to scale? Master asyncio to bypass the Global Interpreter Lock and build high-performance services that handle thousands of concurrent clients.

Pause
Mute Enter Fullscreen
#1 about 2 min

The shift from single-core to multi-core processing

The historical plateau of single-thread processor speeds necessitates programming techniques utilizing multiple CPU cores.

#2 about 2 min

Differences between concurrency, parallelism, and multitasking models

Overlapping tasks provide concurrency while actual simultaneous execution enables true parallelism across separate processing units.

#3 about 4 min

Weighing the benefits and complexities of multitasking

Multitasking improves service capacity and lowers operations costs but introduces significant synchronization overhead and execution unpredictability under Amdahl's Law.

#4 about 4 min

Threading and processing concepts across operating systems

Isolated processes offer safety at the cost of high creation overhead while threads provide fast shared memory access but risk synchronization bugs.

#5 about 3 min

Implementing threads and processes using Python modules

Python provides high-level abstractions like thread pools and executors to map the same functions across multiple parallel targets.

#6 about 5 min

Race conditions and memory synchronization risks

Simultaneous memory access creates race conditions unless variable modifications are protected by mutual exclusion locks.

#7 about 3 min

How the global interpreter lock limits thread execution

Python's internal memory management inherently prevents true execution parallelism by forcing sequential bytecode evaluation within a single active thread.

#8 about 4 min

Event-driven programming to overcome operating system limits

Serving massive concurrent connections mandates avoiding costly threaded configurations in favor of lightweight asynchronous task schedulers.

#9 about 4 min

Asynchronous programming syntax and event loop execution

The async and await keywords permit non-blocking yielding of tasks directly to the internal runtime execution loop.

#10 about 4 min

Achieving concurrency and practical asynchronous implementations

Aggregating asynchronous tasks simultaneously enables modern web framework backends to drastically scale their concurrent request handling.

#11 about 3 min

Considerations for application architecture and system optimization

Evaluating whether to deploy threads, processes, or asynchronous event loops requires careful profiling of computing bottlenecks and external limitations.

Matching moments

2:59 min

Parallel execution through multiprocessing and multithreading concepts

Shweta Palande · LIVE

2:10 min

Overcoming threading challenges for Python on GPUs

Stephen Jones · Coffee With Developers

2:34 min

Achieving high concurrency throughput comparable to compiled languages

Sebastián Ramírez · World Congress 2022

9:07 min

Discussion on scalability and concurrent application performance

Christian Woerz · LIVE

2:31 min

Introduction to Go concurrency and parallelism

Rick Rackow Rick Rackow · World Congress 2026 Europe

1:34 min

Understanding concurrency against parallelism in application execution

Frank Müller · World Congress 2021