Skip to content

Io\Poll\Context::wait() ignores $maxEvents on the poll backend #426

Closed

Description

@blacktrs

Io\Poll\Context::wait() takes a $maxEvents argument, but on the Backend::Poll backend it is ignored: all ready watchers are returned. Found by reading prelude/io_poll.php while documenting it (the docblock now says so); not reproduced with a program. The kqueue and epoll backends use it as the event-buffer size.

Either honour the cap in the poll backend (return at most $maxEvents and keep the rest for the next wait()), or document it as backend-dependent in the signature. Honouring it matters for fairness: a poll-backend loop with thousands of ready descriptors cannot be bounded per iteration today.

Activity

  1. added
    bug
    area:runtime
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:runtimebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions