Checkpoint: Fix downcasting
This commit is contained in:
parent
f50a23accd
commit
c7fc5f3ab7
5 changed files with 65 additions and 43 deletions
|
@ -232,6 +232,7 @@ impl<Thread: 'static + Send + Sync> AppContext<Thread> {
|
|||
}
|
||||
|
||||
fn update<R>(&mut self, update: impl FnOnce(&mut Self) -> R) -> R {
|
||||
dbg!("update");
|
||||
self.pending_updates += 1;
|
||||
let result = update(self);
|
||||
self.pending_updates -= 1;
|
||||
|
@ -242,6 +243,8 @@ impl<Thread: 'static + Send + Sync> AppContext<Thread> {
|
|||
}
|
||||
|
||||
fn flush_effects(&mut self) {
|
||||
dbg!("Flush effects");
|
||||
|
||||
while let Some(effect) = self.pending_effects.pop_front() {
|
||||
match effect {
|
||||
Effect::Notify(entity_id) => self.apply_notify_effect(entity_id),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue