feat: poll async once

This commit is contained in:
Jonathan Kelley committed 2022-11-03 20:56:31 -07:00
1 parent 94601ccd1f
commit d2ce57ba6e
9 files changed
+150 -67

No files matched your search

+4 -4
View File
@@ -2,23 +2,23 @@ use std::cell::Cell;
use bumpalo::Bump;
use crate::nodes::VNode;
use crate::factory::RenderReturn;
pub struct BumpFrame {
pub bump: Bump,
pub node: Cell<*const VNode<'static>>,
pub node: Cell<*mut RenderReturn<'static>>,
}
impl BumpFrame {
pub fn new(capacity: usize) -> Self {
let bump = Bump::with_capacity(capacity);
Self {
bump,
node: Cell::new(std::ptr::null()),
node: Cell::new(std::ptr::null_mut()),
}
}
pub fn reset(&mut self) {
self.bump.reset();
self.node.set(std::ptr::null());
self.node.set(std::ptr::null_mut());
}
}