Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite internals #142

Merged
merged 346 commits into from
Jan 25, 2025
Merged

Rewrite internals #142

merged 346 commits into from
Jan 25, 2025

Conversation

Thomasdezeeuw
Copy link
Owner

@Thomasdezeeuw Thomasdezeeuw commented Dec 15, 2024

This rewrites the internals to support OS implementations other than io_uring. This way A10 can be ported (more easily) to other platforms such as kqueue.

The caller must uphold some conditions the compiler can not check.
Indicates whether or not the operation should be resubmitted. For kqueue
this will always be true, for io_uring this will be false.
Use T::drop_from_waker_data directly.
To support direct descriptors.
Renames CompletionState types to OperationState to match the trait name.
To support multishot operations.
To make space for submodules.
Instead of exposing the implementation specific type.
Allows the two be configured separately.
We can safely do it without this requirement.
Wrapper around libc::iovec to not depend on an external crate in the
public API.

Also helps with implementing Send, Sync and fmt::Debug.
Before this commit we assumed that the task::Waker never changed between
calls to Future::poll AsyncIter::poll_next.

This commit changes it to always attempt to update the waker when we
return Poll::Pending
These aren't actually filled.
The box is an implementation detail. Also want to move to a not-libc
type in the future.
Had to be manually implemented, which means exposing some of the op
module's types, such as op::State.
Now uses the AsyncIterator implementation for ReceiveSignals.
@Thomasdezeeuw Thomasdezeeuw mentioned this pull request Jan 4, 2025
Rust 1.84 isn't released yet.
Some of these are outdated, others are turned into GitHub issues and
others still refer to Rust unstable features that have been unstable for
too long.
@Thomasdezeeuw Thomasdezeeuw marked this pull request as ready for review January 4, 2025 17:52
Before it would only call the drop method, but not actually drop the
state itself.
Rust 1.84 has been released.
Required for task::Waker::noop.
Rust 1.85 isn't stable yet.
@Thomasdezeeuw Thomasdezeeuw merged commit 664289c into main Jan 25, 2025
6 checks passed
@Thomasdezeeuw Thomasdezeeuw deleted the port branch January 25, 2025 13:36
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