Skip to content

Replace usage of multiple events in WaitForMultipleObjectsEx on non-Windows with multi-platform abstraction #132149

Description

@jkoritzinsky

Today, we use WaitForMultipleObjectsEx on Windows and non-Windows with multiple events/wait handles (including a process handle) in the debugger-runtime communication. This is the last usage of multiple events (and waiting on a process handle) with this CoreCLR PAL API. Once we remove this, we can remove the native wait subsystem and replace with a simple xplat implementation a-la NativeAOT's CLREvent that only supports WaitForMultipleObjectsEx with one event on non-Windows.

We can replace the handles and the usage with an xplat design in the CoreCLR minipal (or the repo minipal) that has the following implementations for this constrained use case:

Win32: Win32 Wait Handles
Linux: anonymous pipes + select (using pidfd_open when available, otherwise with an auxiliary thread for waiting for the process as exists today in the wait subsystem)
MacOS (and also all BSD platforms): kqueue

cc: @hoyosjs

Activity

  1. added this to the 12.0.0 milestone on Aug 11, 2026
  2. locked and limited conversation to collaborators on Sep 21, 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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions