Skip to content

IOCP: accepted pipes on the loop's own port take the thread-pool bridge on every I/O #9

Closed

Description

@proggeramlug

Accepted named pipes are always marked routed = true (backend/iocp/mod.rs, Accept for PipeListener), even when they stay associated with this loop's own completion port.

Every read and write on them then costs:

  • a RegisterWaitForSingleObject (heap-allocated inside ntdll),
  • a thread-pool hop,
  • a blocking UnregisterWaitEx.

This is the Node IPC path. ipc_handle_transfer_and_external_waits_allocate_nothing_after_setup still passes only because the Rust counting allocator can't see ntdll's heap, so DESIGN §10 rule 1 holds only nominally.

Expected:

  • Skip the bridge when the handle's association is this loop's own port.
  • Add a Windows test that proves an accepted pipe on the same loop does no wait registration, for example via a debug counter of bridge registrations.

Found in the PR #5 integrator review (item 6).

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions