RFC: Server should execute requests on a thread pool when client does not specify an execution thread
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- cpp
調査の方向性
external-interfaces のトランスクリプトと、issue に記載されている現在の ThreadMap.makeThread および Context.thread の動作から始めます。サーバー側の thread pool の設計と、それが欠落した thread handle、mp.Context を持たないメソッド、callback、レスポンスの順序に及ぼす影響を明らかにします。ファイルやテストは指定されていないため、合意済みの RFC または実装計画があれば完了とします。
索引モデルが issue の本文から書いたものです。
説明
Referencing: https://btctranscripts.com/bitcoin-core-dev-tech/2026-05/external-interfaces
Problem: IPC interface can be awkward to call due to threading
- Clients have to choose which thread asynchronous calls execute on, and create threads for calls to execute on
- Could be improved by server executing requests on a thread pool when client does not specify an execution thread
Currently, clients that call IPC methods must first call ThreadMap.makeThread to create a server-side worker thread and pass the resulting Thread handle in Context.thread on every call so it executes on a dedicated thread. Libmultiprocess abstracts this away for C++ clients, but clients that don't use libmultiprocess (which only supports C++) must handle this setup manually, making the IPC interface more awkward to call.
Proposed improvement: When a client passes a null/missing Context.thread, or when a method has no mp.Context parameter at all, the server should fall back to executing the request on a server-managed thread pool instead of blocking the event loop thread or failing with "invalid thread handle". This would simplify non-libmultiprocess clients that doesn't need a dedicated thread model.
Caveats:
- Callbacks require the client to still provide Context.callbackThread
- Response ordering is not guaranteed when requests from the same client land on different pool threads. The dedicated thread model avoids this by always queuing requests from the same client on one thread
- 主要言語
- C++
- スター
- 62
- フォーク
- 58
- 平均マージ
- 9日 9時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bitcoin-core/libmultiprocess のほかの issue
-
Listeners can't be stopped, so bitcoin-node can hang after shutdown when an IPC client reconnectsオープンbug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
bitcoin-core/libmultiprocess#385 ·
メンテナーはふだん 1 日以内に返信
-
bug hardening
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
bitcoin-core/libmultiprocess#384 ·
メンテナーはふだん 1 日以内に返信
-
Calling an IPC object after or during destroy() makes the server use a null or freed implementation対応中かも @xyzconstant が 10 日前に担当しました。 オープンbug hardening
難易度 4/5 3〜5日 初心者へのやさしさ 40/100
bitcoin-core/libmultiprocess#378 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
bitcoin-core/libmultiprocess#329 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
bitcoin-core/libmultiprocess#328 ·
メンテナーはふだん 1 日以内に返信
bitcoin-core/libmultiprocess の issue をすべて見る
似ている issue
-
bug module:nodes tests
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rocketride-org/rocketride-server#3020 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
pocoproject/poco#5636 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/cppwinrt#1646 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信