Fix effect ordering after reruns
This commit is contained in:
1 parent
26f5fb80cb
commit
a14e5be7ad
8 files changed
+89
-51
No files matched your search
@@ -260,10 +260,7 @@ pub fn after_render(f: impl FnMut() + 'static) {
|
||||
pub async fn flush_sync() {
|
||||
// Wait for the flush lock to be available
|
||||
// We release it immediately, so it's impossible for the lock to be held longer than this function
|
||||
Runtime::with(|rt| rt.flush_mutex.clone())
|
||||
.unwrap()
|
||||
.lock()
|
||||
.await;
|
||||
Runtime::with(|rt| rt.render_signal.subscribe()).unwrap().await;
|
||||
}
|
||||
|
||||
/// Use a hook with a cleanup function
|
||||
|
||||
Reference in new issue
Block a user