feat(wayland): fully async!!!
This commit is contained in:
12
src/core/destroy_queue.rs
Normal file
12
src/core/destroy_queue.rs
Normal 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();
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
pub mod destroy_queue;
|
||||
pub mod resource;
|
||||
pub mod client;
|
||||
pub mod eventloop;
|
||||
|
||||
Reference in New Issue
Block a user