Checkpoint

This commit is contained in:
Nathan Sobo 2023-10-02 12:47:45 -06:00
parent 4212a45767
commit 0b13c0a437
7 changed files with 177 additions and 157 deletions

View file

@ -4,10 +4,10 @@ use parking_lot::Mutex;
use std::sync::Weak;
#[derive(Clone)]
pub struct AsyncContext<Thread = ()>(pub(crate) Weak<Mutex<AppContext<Thread>>>);
pub struct AsyncContext(pub(crate) Weak<Mutex<AppContext>>);
impl Context for AsyncContext {
type EntityContext<'a, 'b, T: Send + Sync + 'static> = ModelContext<'a, T>;
type EntityContext<'a, 'b, T: 'static + Send + Sync> = ModelContext<'a, T>;
type Result<T> = Result<T>;
fn entity<T: Send + Sync + 'static>(
@ -36,7 +36,7 @@ impl Context for AsyncContext {
}
}
impl<Thread: 'static + Send + Sync> AsyncContext<Thread> {
impl AsyncContext {
pub fn update_window<T>(
&self,
handle: AnyWindowHandle,