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.
Matching moments
21:20 MIN
Achieving high performance with async support
Intro to FastAPI
18:53 MIN
How coroutines fit into modern threading models
Coroutine explained yet again 60 years later
00:26 MIN
Prerequisites and agenda for the FastAPI talk
Build your backend using FastAPI
16:54 MIN
Asynchronous programming with futures and isolates
Dart - a language believed dead, experiences a new bloom
17:41 MIN
Presenting live web scraping demos at a developer conference
Tech with Tim at WeAreDevelopers World Congress 2024
20:43 MIN
Recap and audience questions on FastAPI
Build your backend using FastAPI
16:43 MIN
Simplifying streaming with modern Python-native frameworks
Python-Based Data Streaming Pipelines Within Minutes
26:13 MIN
Q&A on serverless, GitHub issues, and Python evolution
Intro to FastAPI
Featured Partners
Related Videos
Accelerating Python on GPUs
Paul Graham
CUDA in Python
Andy Terrel
Devouring APIs with Python
Shweta Palande
Python: Behind the Scenes
Diana Gastrin
Exploring Durable Execution with Python
Geetha Anne
Python-Based Data Streaming Pipelines Within Minutes
Bobur Umurzokov
Vectorize all the things! Using linear algebra and NumPy to make your Python code lightning fast.
Jodie Burchell
Anvil: Full Stack Web Apps With Nothing But Python
Meredydd Luff
From learning to earning
Jobs that call for the skills explored in this talk.
![Senior Software Engineer [TypeScript] (Prisma Postgres)](https://wearedevelopers.imgix.net/company/283ba9dbbab3649de02b9b49e6284fd9/cover/oKWz2s90Z218LE8pFthP.png?w=400&ar=3.55&fit=crop&crop=entropy&auto=compress,format)

Senior Software Engineer [TypeScript] (Prisma Postgres)
Prisma
Remote
Senior
Node.js
TypeScript
PostgreSQL
Web Developer * - Python und FastAPI
UNITY AG
Lippstadt, Germany
Azure
Julia
Python
FastAPI
Amazon Web Services (AWS)
Python Developer FastAPI SQL Data
Client Server
Charing Cross, United Kingdom
Remote
€80-90K
Azure
Python
FastAPI
+4
Senior Python Developer - FastAPI
BETWEEN TECHNOLOGY
Municipality of Madrid, Spain
Senior
API
Azure
Python
Gitlab
FastAPI
+2
Pythonentwickler:in (Schwerpunkt Api- und Webentwicklung)
aconium GmbH
Berlin, Germany
Remote
API
React
Python
FastAPI
+2


