Explore ManualResetEvent waiter storage and state fast paths
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #315 @tisonkun による — マージされずにクローズ
評価
調査の方向性
まず PR #243 とフォローアップ #221 を確認し、その後、現在の ManualResetEvent、WaitList、WaitSet の実装を調査します。必要なベンチマークケースを含め、登録、キャンセル、ウェイクアップ、コールバック、メモリ公開の各契約に照らして代替案を比較します。代替案に意味のある利点があるかどうかを文書化するか、現在の実装を維持すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Background
PR #243 added ManualResetEvent with a mutex-protected boolean state and WaitList. Its approval review left the internal representation as a follow-up exploration: the ideas may improve the implementation, but keeping the current design is valid if the alternatives do not preserve its contracts or reduce overall cost.
Questions to explore
- Can
ManualResetEventreplaceWaitListand its per-waiternotifiedstate withWaitSetwhile preserving the rule that every wait registered beforesetremains committed even ifresethappens before its next poll? - Can
is_setand the already-set wait path use an atomic boolean, or another compact atomic state, instead of acquiring the state mutex on every observation?
Requirements
- preserve the public API and the set/reset, first-poll registration, cancellation, and memory-publication contracts introduced by #243;
- prevent lost wake-ups across concurrent state checks, waiter registration,
set, andreset; - keep waker clone, drop, and wake callbacks outside internal locks;
- account for reentrant callbacks and a rapid
setfollowed byreset; - compare complexity and benchmark results with the current implementation, including
is_set, already-set waits, pending registration/cancellation, set/reset reuse, and fan-out; - prefer the current implementation if an alternative only moves complexity or lacks a meaningful workload benefit.
Follow-up to #221 and #243. The originating approval review is here.
- 主要言語
- Rust
- スター
- 277
- フォーク
- 44
- 平均マージ
- 1日 1分
- マージ済み PR(30日)
- 40
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/asyncband のほかの issue
-
enhancement good first issue help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/asyncband#324 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement question
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
apache/asyncband#312 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
apache/asyncband#272 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
apache/asyncband#224 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
apache/asyncband の issue をすべて見る
似ている issue
-
enhancement user-priority/P3
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
element-hq/lk-jwt-service#248 ·
メンテナーはふだん 1 日以内に返信
-
agent:triaged bug bughunt pm:pipenv priority:p1
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SocketDev/socket-patch#1219 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pact-foundation/pact-cli#154 ·
メンテナーはふだん 3 日以内に返信