python / python/cpython

concurrent.futures.Future.add_done_callback: calling thread description error.

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

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

docs
主要言語
Python
スター
77.2k
フォーク
36k
PR マージ指標
PR 指標を取得中

説明

asyncio.run_coroutine_threadsafe will return a concurrent.futures.Future.
And according to its doc concurrent.futures.Future.add_done_callback() :

Added callables are called in the order that they were added and are always ** called in a thread belonging to the process that added them. **

But acually, the callback is called in where Future.set_result() is called according to its source.

Linked PRs
  • gh-122678

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

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

はじめの一歩

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

調査の方向性

concurrent.futures.Future.add_done_callback() のドキュメントと、asyncio.run_coroutine_threadsafe を介して到達する動作から始め、Future.set_result() のソースパスと記述を比較します。変更を加える前に既存のリンクされた PR を考慮したうえで、コールバックが実行されるスレッドをドキュメントが正確に説明していれば完了です。

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

評価

技術スタック
python
領域
documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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