feat: dmatex!! (sorta, borken)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use super::{
|
||||
client_state::{CLIENT_STATES, ClientStateParsed},
|
||||
destroy_queue,
|
||||
scenegraph::Scenegraph,
|
||||
};
|
||||
use crate::{
|
||||
@@ -231,9 +230,6 @@ impl Client {
|
||||
if let Some(flush_join_handle) = self.flush_join_handle.get() {
|
||||
flush_join_handle.abort();
|
||||
}
|
||||
if let Some(client) = CLIENTS.remove(self) {
|
||||
destroy_queue::add(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
impl Debug for Client {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
use parking_lot::Mutex;
|
||||
use std::{any::Any, sync::LazyLock};
|
||||
use tokio::sync::mpsc::{self, unbounded_channel};
|
||||
|
||||
type Anything = Box<dyn Any + Send + Sync>;
|
||||
|
||||
static MAIN_DESTROY_QUEUE: LazyLock<(
|
||||
mpsc::UnboundedSender<Anything>,
|
||||
Mutex<mpsc::UnboundedReceiver<Anything>>,
|
||||
)> = LazyLock::new(|| {
|
||||
let (tx, rx) = unbounded_channel();
|
||||
(tx, Mutex::new(rx))
|
||||
});
|
||||
|
||||
pub fn add<T: Any + Sync + Send>(thing: T) {
|
||||
MAIN_DESTROY_QUEUE.0.send(Box::new(thing)).unwrap();
|
||||
}
|
||||
|
||||
pub fn clear() {
|
||||
while let Ok(thing) = MAIN_DESTROY_QUEUE.1.lock().try_recv() {
|
||||
drop(thing)
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
use bevy::asset::Assets;
|
||||
use bevy::ecs::world::Mut;
|
||||
use bevy::image::Image;
|
||||
|
||||
pub struct GraphicsInfo<'w> {
|
||||
pub _images: Mut<'w, Assets<Image>>,
|
||||
}
|
||||
@@ -3,10 +3,8 @@ pub mod client;
|
||||
pub mod client_state;
|
||||
pub mod color;
|
||||
pub mod delta;
|
||||
pub mod destroy_queue;
|
||||
pub mod entity_handle;
|
||||
pub mod error;
|
||||
pub mod graphics_info;
|
||||
pub mod registry;
|
||||
pub mod resource;
|
||||
pub mod scenegraph;
|
||||
|
||||
Reference in New Issue
Block a user