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

Abierto
#18,301 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
csharp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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)
Lenguaje dominante
Java
Estrellas
34.6k
Forks
8.7k
Merge medio
1 d 23 h
PR fusionados (30 d)
86

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SeleniumHQ/selenium

Todos los issues de SeleniumHQ/selenium

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.