feat(wayland): fully async!!!

This commit is contained in:
Nova
2022-09-04 00:35:44 -04:00
parent a42834063e
commit 50161ed87d
12 changed files with 328 additions and 211 deletions

12
src/core/destroy_queue.rs Normal file
View File

@@ -0,0 +1,12 @@
use parking_lot::Mutex;
use std::any::Any;
static MAIN_DESTROY_QUEUE: Mutex<Vec<Box<dyn Any + Send + Sync>>> = Mutex::new(Vec::new());
pub fn add<T: Any + Sync + Send>(thing: T) {
MAIN_DESTROY_QUEUE.lock().push(Box::new(thing));
}
pub fn clear() {
MAIN_DESTROY_QUEUE.lock().clear();
}

View File

@@ -1,3 +1,4 @@
pub mod destroy_queue;
pub mod resource;
pub mod client;
pub mod eventloop;