swift-server / swift-server/async-http-client
Accept any EventLoops in `.delegate(on:)`, not just ones from AHC's own ELG
まだ誰も着手していません。
- 主要言語
- Swift
- スター
- 1.1k
- フォーク
- 156
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
The badly named but highly useful .delegate(on:) specifies two things:
- Which
EventLoopthe returned futures are bound to - Which
EventLoopthe delegate callouts happen on.
Crucially it does not specify on what EventLoop the underlying Channels are running on. Yes, as an optimisation if possible & sensible (i.e. the connection pool doesn't already have a valid connection) we try to create new Channels on the same EventLoop but that's neither guaranteed nor required.
Expected behaviour
If I pass a random EventLoop to AHC's eventLoop: .delegate(on: myRandomEL) then I would expect this to work, even if AHC itself is using an EventLoopGroup that doesn't contain my EventLoop for its Channels.
Actual behaviour
AHC crashes and tells me that I can only use EventLoops from AHC's EventLoopGroup at runtime. That's bad an unnecessary.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
.delegate(on:) のエントリーポイントから開始し、渡された EventLoop を AHC 独自の EventLoopGroup に制限しているランタイム検証を追跡します。別のグループの EventLoop を使ったテストカバレッジを追加し、そのうえで、基盤となる Channels が引き続き AHC によって管理されながら、クラッシュせずに委譲が機能することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- swift
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100