python / python/cpython

Add A Howto Page About Concurrency in Python

Đang mở
#123,152 7 bình luận 2 reaction 1 người được giao Xem trên GitHub

@ericsnowcurrently đang làm issue này rồi.

Từ ngày 19/8/2024.

docs
Ngôn ngữ chính
Python
Star
77.2k
Fork
35.9k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.