Skip to content

Conversation

ezrast
Copy link

@ezrast ezrast commented Aug 14, 2024

This adds get_events to complement get_fd and get_revents.

The motivation is to allow for copying an entry over another, so that iomux's array can be kept contiguous by only ever invalidating the highest-index element:

let swap_invalidate iomux size idx =
  let open Iomux.Poll in
    size := ((!size) - 1);
    set_index iomux idx (get_fd iomux (!size)) (get_events iomux (!size));
    invalidate_index iomux (!size)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant