cpu_worker: add worker-thread framework
This commit is contained in:
parent
874d0d0c59
commit
ed4ef3c8e7
10 changed files with 718 additions and 3 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue