Thomasdezeeuw / a10

Library safely exposing the io_uring API.
MIT License
55 stars 2 forks source link

Add support for io_uring's direct descriptors #102

Closed Thomasdezeeuw closed 7 months ago

Thomasdezeeuw commented 9 months ago

Direct descriptors are file descriptors that are private with io_uring allowing it to avoid some of the avoid by avoiding syncing with the shared fd tables.

This changes AsyncFd to accept a new generic parameter, D, which requires to implement the Descriptor trait. This Descriptor traits defines some behaviour on what to do when making submissions, mainly it sets the IOSQE_FIXED_FILE flag for direct descriptors.

We still default to a regular file descriptor, AsyncFd (without setting the generic parameter) still refer to a regular file descriptor (not direct).

Closes #39 Closes #101

Thomasdezeeuw commented 7 months ago

At this point I think all API can use direct descriptors except for process::Signals. Next is testing.