Fabian Schindler
Concurrency in Python
#1about 4 minutes
Defining concurrency, parallelism, and multitasking
Key terms like concurrency, parallelism, cooperative multitasking, and preemptive multitasking are defined to build a foundational understanding.
#2about 3 minutes
Weighing the benefits and complexity of multitasking
Multitasking can improve performance and reduce costs, but it introduces complexity, non-determinism, and is limited by Amdahl's Law.
#3about 5 minutes
Understanding the differences between processes and threads
Processes are isolated with higher overhead, while threads are lightweight and share memory, with examples using Python's `threading` and `multiprocessing` modules.
#4about 1 minute
Simplifying concurrency with executor pools
The `concurrent.futures` module provides a high-level interface with `ThreadPoolExecutor` and `ProcessPoolExecutor` to easily apply a function to multiple data items.
#5about 5 minutes
How to prevent data corruption with locks
Race conditions occur when multiple threads access shared data simultaneously, which can be prevented by using a mutex or `threading.Lock` to ensure exclusive access.
#6about 2 minutes
How Python's global interpreter lock affects multithreading
The GIL is a mutex that protects access to Python objects, preventing multiple native threads from executing Python bytecodes at the same time and impacting CPU-bound tasks.
#7about 4 minutes
Overcoming thread limitations with event-driven programming
The C10k problem highlights the inefficiency of a thread-per-client model, leading to event-driven solutions like asynchronous programming to handle many concurrent connections.
#8about 5 minutes
Writing concurrent code with async and await
Python's `async` and `await` keywords enable cooperative multitasking, allowing you to run many tasks concurrently on a single thread using an event loop from the `asyncio` module.
#9about 2 minutes
Building high-performance web services with Starlette
The Starlette web framework demonstrates how `asyncio` can be used to build highly concurrent web servers capable of handling many clients efficiently.
#10about 2 minutes
Q&A on Python's speed and choosing thread counts
Answers to common questions address Python's perceived slowness by working around limitations like the GIL and explain that benchmarking is key to finding the optimal number of threads.
Related jobs
Jobs that call for the skills explored in this talk.
Power Plus Communications
Mannheim, Germany
Intermediate
Senior
Python
Automated Testing
+1
Matching moments
02:49 MIN
Using AI to overcome challenges in systems programming
AI in the Open and in Browsers - Tarek Ziadé
01:15 MIN
Crypto crime, EU regulation, and working while you sleep
Fake or News: Self-Driving Cars on Subscription, Crypto Attacks Rising and Working While You Sleep - Théodore Lefèvre
03:07 MIN
Final advice for developers adapting to AI
WeAreDevelopers LIVE – AI, Freelancing, Keeping Up with Tech and More
08:07 MIN
Exploring modern JavaScript performance and new CSS features
WeAreDevelopers LIVE – AI, Freelancing, Keeping Up with Tech and More
02:33 MIN
Why you might not need JavaScript for everything
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
04:09 MIN
How Python became the dominant language for AI
AI in the Open and in Browsers - Tarek Ziadé
09:00 MIN
Navigating the growing complexity of modern CSS
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
01:32 MIN
Organizing a developer conference for 15,000 attendees
Cat Herding with Lions and Tigers - Christian Heilmann
Featured Partners
Related Videos
Accelerating Python on GPUs
Paul Graham
Concurrency with Go
Frank Müller
The Eventloop in JavaScript - How does it work?
Christian Woerz
Introduction and pitfalls of Java's new concurrency model
David Vlijmincx
Java 21: The Revolution of Virtual Threads - A Deep Dive
Christian Woerz
CUDA in Python
Andy Terrel
Coroutine explained yet again 60 years later
Mikhail Maslo
Multithreading in Javascript: A guide to Web Workers
Dani Coll
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

Visonum GmbH
Remote
Junior
Intermediate
React
Redux
TypeScript



Tecdata
Municipality of Madrid, Spain
Intermediate
API
Python
FastAPI

Client Server
Cambridge, United Kingdom
Remote
£100-120K
Senior
API
DevOps
Python
+6

microTECH Global Limited
Cambridge, United Kingdom
Remote
Intermediate
GIT
Bash
VHDL
Python
+3


United Kingdom - 2 minutes ago
Intermediate
API
GIT
Azure
React
Python
+6

Runtime Group Ltd
Charing Cross, United Kingdom
£72K
Intermediate
NumPy
DevOps
Python
Pandas
+8