python / python/cpython

Some multiprocessing APIs should be possible to import or use even when multiprocessing itself isn't available

オープン
#134,634 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

OS-android OS-ios type-feature
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

Bug report

Bug description:

Android doesn't support multiprocessing because it doesn't support the System V IPC API, and iOS doesn't support subprocesses at all. However, there are a couple of things that should still work on these platforms, but currently don't:

  • multiprocessing.dummy.Pool (aka multiprocessing.pool.ThreadPool) currently depends on the multiprocessing synchronization primitives, when it could use the threading equivalents instead.

  • multiprocessing.synchronize throws an exception on import if the synchronization primitives are unavailable. But this breaks some packages like joblib, which imports the primitives but doesn't always use them (joblib/joblib#825).

Chaquopy has some monkey patches to work around these issues, but it would be better if they were fixed upstream.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs
  • gh-148050

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず multiprocessing.dummy.Pool と multiprocessing.pool.ThreadPool のエントリーポイントを確認し、次に multiprocessing.synchronize と、同期プリミティブを持たないプラットフォームでのインポート時の失敗を調査します。必要な動作を threading の同等機能と比較し、リンクされた PR gh-148050 を確認します。対応する API を、利用できない multiprocessing 機能なしでインポートまたは使用できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
operating-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。