Skip to content

eventloop: add support for custom registrations#48188

Merged
jkarneges merged 1 commit intomainfrom
jkarneges/eventloop-custom
Apr 1, 2025
Merged

eventloop: add support for custom registrations#48188
jkarneges merged 1 commit intomainfrom
jkarneges/eventloop-custom

Conversation

@jkarneges
Copy link
Copy Markdown
Member

@jkarneges jkarneges commented Apr 1, 2025

This makes it possible to register a callback to be called when an event::SetReadiness is invoked. The EventLoop::register_custom method is like Reactor::register_custom, except the backing event::Registration is managed internally and an event::SetReadiness is returned.

There is also some eventloop code rearrangement, using mio::Interest instead of u8 in the native API, and moving common bits into the event module. In general, we want to keep native APIs idiomatic, even if they will only be used via FFIs, and we want FFIs to be organized similarly to the native APIs they wrap.

@jkarneges jkarneges merged commit 6fdbe8f into main Apr 1, 2025
19 checks passed
@jkarneges jkarneges deleted the jkarneges/eventloop-custom branch April 1, 2025 16:22
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.

2 participants