1
0
Fork 0
forked from wry/wry

runtime: replace epoll by io-uring

This commit is contained in:
Julian Orth 2022-05-12 22:50:33 +02:00
parent 98cc85e2d3
commit 9416efeabe
21 changed files with 173 additions and 742 deletions

View file

@ -1,6 +1,6 @@
use {
crate::{
async_engine::{ae_queue::DispatchQueue, Phase},
async_engine::{AsyncEngine, Phase},
utils::{
numcell::NumCell,
ptr_ext::{MutPtrExt, PtrExt},
@ -94,7 +94,7 @@ struct Task<T, F: Future<Output = T>> {
state: NumCell<u32>,
data: UnsafeCell<TaskData<T, F>>,
waker: Cell<Option<Waker>>,
queue: Rc<DispatchQueue>,
queue: Rc<AsyncEngine>,
}
pub(super) struct Runnable {
@ -119,8 +119,8 @@ impl Drop for Runnable {
}
}
impl DispatchQueue {
pub(super) fn spawn<T, F: Future<Output = T>>(
impl AsyncEngine {
pub(super) fn spawn_<T, F: Future<Output = T>>(
self: &Rc<Self>,
phase: Phase,
f: F,