python / python/cpython

Add A Howto Page About Concurrency in Python

Offen
#123,152 7 Kommentare 2 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@ericsnowcurrently arbeitet bereits daran.

Seit 19.8.2024.

docs
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.