mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
cb450f4996
fd_executor, uring_executor, and handle_executor had a lot of duplicate code. A new trait `Reactor` is introduced to abstract away the differences between the IO backends. There is now a single `RawExecutor`, which is generic over `Reactor`s. No behavior changes are intended, with some small exceptions: * A new error variant is used in some cases, e.g. instead of `Error::PollExecutor` an error might be `Error::Io` now. Nothing seems to inspect these errors, so it is unlikely to cause an issue. * There is an extra alloc when the executor is dropped (for the boxed future). * The Unix backends had an `AtomicI32` state field but the Windows backend did not. Now Windows does as well. This might save a syscall here and there. Change-Id: Ieeff9d9888ed082cf3e0213e586c55c9d8a1f8bf Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4331554 Reviewed-by: Noah Gold <nkgold@google.com> Commit-Queue: Frederick Mayle <fmayle@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |