1
0
Fork 0
forked from wry/wry

io-uring: ensure that timeouts are encoded in the same submission

This commit is contained in:
Julian Orth 2022-05-13 22:31:56 +02:00
parent 7cc6c945d3
commit 4780315f50
5 changed files with 35 additions and 18 deletions

View file

@ -56,10 +56,6 @@ impl<T> AsyncQueue<T> {
}
self.waiter.take();
}
pub fn is_empty(&self) -> bool {
unsafe { self.data.get().deref().is_empty() }
}
}
pub struct AsyncQueuePop<'a, T> {

View file

@ -23,6 +23,12 @@ impl<T> SyncQueue<T> {
}
}
pub fn push_front(&self, t: T) {
unsafe {
self.el.get().deref_mut().push_front(t);
}
}
pub fn pop(&self) -> Option<T> {
unsafe { self.el.get().deref_mut().pop_front() }
}