python / python/cpython

Add A Howto Page About Concurrency in Python

Open
#123,152 7 comments 2 reactions 1 assignee View on GitHub

@ericsnowcurrently is already working on this.

Since Aug 19, 2024.

docs
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

It would help to have a place where the various approaches to concurrency in Python are explained and compared. It would be especially useful to enumerate the most common concurrency-oriented workloads and show how to implement them using the different concurrency models.

I expect we would cover the following concurrency models:

  • threads (threading and concurrent.futures)
  • multi-processing (multiprocessing and concurrent.futures)
  • async/await
  • CSP/actor model (PEP 734 interpreters)
  • distributed (e.g. SMP/dask)

Other related resources:

Linked PRs
  • gh-123163

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.