[🚀 Feature]: [dotnet] [bidi] opt-in parallel event handler execution

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp

調査の方向性

Start by locating the .NET BiDi event subscription implementation and the IEventSource<T> and IBiDi interfaces named in the proposed API. Trace how subscriptions invoke handlers and drain work during disposal, then check the related subscription tests. Done means an opt-in concurrency setting or equivalent API is implemented with the stated ordering, failure propagation, and disposal behavior clarified and covered by tests.

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

説明

A-needs-triaging I-enhancement
Description

BiDi event handlers run serially per subscription: one worker awaits each handler before taking the next event. Good default (ordered, isolated, drains on dispose), but throughput is bounded by handler latency.

50 console.log events with a 100 ms handler take ~5 s; with 8 concurrent handlers ~0.7 s.

Users wanting concurrency today must fire-and-forget inside the handler (losing failure propagation and drain-on-dispose) or write a custom StreamAsync() consumer.

Have you considered any alternatives or workarounds?

Opt in to invoke handlers parallelizable.

Proposed API
public sealed class SubscribeOptions
{
    public int MaxConcurrency { get; set; } = 1;
}

// new overloads on IEventSource<T> (and IBiDi)
Task<ISubscription> SubscribeAsync(Func<T, Task> handler, SubscribeOptions options, CancellationToken ct = default);
Task<ISubscription> SubscribeAsync(Action<T> handler, SubscribeOptions options, CancellationToken ct = default);

Or something like chaining handlers:

source.WithParallel(8).SubscribeAsync(handler)
主要言語
Java
スター
34.6k
フォーク
8.7k
平均マージ
1日 23時間
マージ済み PR(30日)
86

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

SeleniumHQ/selenium のほかの issue

SeleniumHQ/selenium の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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