1
0
Fork 0
forked from wry/wry

cpu_worker: add worker-thread framework

This commit is contained in:
Julian Orth 2024-09-07 17:18:50 +02:00
parent 874d0d0c59
commit ed4ef3c8e7
10 changed files with 718 additions and 3 deletions

View file

@ -64,6 +64,12 @@ impl<T> AsyncQueue<T> {
}
self.waiter.take();
}
pub fn move_to(&self, other: &mut VecDeque<T>) {
unsafe {
other.append(self.data.get().deref_mut());
}
}
}
pub struct AsyncQueuePop<'a, T> {