python / python/cpython

Cross-interpreter support for efficient sharing of frozendicts

オープン
#148,234 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

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

extension-modules topic-subinterpreters type-feature
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

Feature or enhancement

Proposal:

The concurrent.interpreters module for subinterpreters handles sharing/sending values across interpreters with direct sharing of some basic immutable types, and a fallback to pickling others. As an immutable container, tuples are supported (as long as all items are themselves shareable). Similarly, I think it would be good to support sharing frozendict without serialization (if keys & values are shareable).

Because dictionaries are so fundamental and common, having a better and more performant way to share such a mapping would significantly improve the experience of using concurrent.interpreters and InterpreterPoolExecutor.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

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

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

はじめの一歩

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

調査の方向性

まず、オブジェクトの共有に関する concurrent.interpreters のドキュメントと、モジュールにおける共有可能なタプルおよびマッピングの既存の扱いを読んでください。すべてのキーと値が共有可能である場合に frozendict の共有がどのように機能するかを判断してください。完了の条件は、サポートされる値が pickling なしでインタープリター間を移動し、その動作が関連するテストでカバーされていることです。

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

評価

技術スタック
python
領域
backend
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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