Define duplicate registration behavior for portable event_add

Abierto
#1,011 0 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
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
linux, rust

Línea de trabajo

Start by reading std/sys/macos/event.wave:66 and comparing it with the Linux, Windows, and kqueue event-provider sources plus the documented kqueue semantics. Before implementation, discuss the add-versus-modify and token-ownership contract with @LunaStev, as the issue explicitly leaves the design unresolved. Done means each backend has documented same-token and different-token duplicate-add behavior, consistent modify/remove interactions, and native or backend-boundary fixtures covering the complete sequence.

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

Descripción

discussion enhancement help wanted

Motivation

Linux epoll ADD and the Windows set reject an already registered descriptor, while kqueue EV_ADD updates an existing ident/filter registration. The portable facade exposes these as the same add operation without defining the duplicate/token replacement contract.

Starting point: std/sys/macos/event.wave:66.

Validation

Audited canonical Wave 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 (0.0.1-alpha-dev), whose tree matches the local checkout. Validation: Compared Linux/Windows/kqueue provider source and official kqueue semantics. Executed compiler probes use the matching checkout-built compiler and std on Linux amd64 (Rust 1.89.0 / LLVM 21.1.8). Source/header or mocked checks are not native execution on another OS.

FreeBSD kqueue(2) specifies that re-adding modifies an existing event.

Scope

Choose consistent add-versus-modify and token ownership semantics, or make the capability difference explicit. Do not silently rely on one backend's behavior.

Design discussion required

This issue records a proposal or an unresolved contract; it is not approval to choose new semantics. Please mention @LunaStev to discuss the design before starting implementation.

Completion criteria

  • Duplicate add with the same and different tokens has a documented result on each backend.
  • Modify/remove interactions follow the same ownership contract.
  • Native/backend-boundary fixtures check the complete sequence.
Lenguaje dominante
Rust
Estrellas
56
Forks
21
Merge medio
23 h 20 min
PR fusionados (30 d)
45

Preparar el entorno

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 wavefnd/Wave

Todos los issues de wavefnd/Wave

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.