Skip to content

Commit

Permalink
rename flush_sync to wait_for_next_render
Browse files Browse the repository at this point in the history
  • Loading branch information
ealmloff committed Mar 5, 2024
1 parent d2ff15b commit d7ef43e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/core/tests/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async fn flushing() {
spawn(async move {
let mut channel = BROADCAST.with(|b| b.1.resubscribe());
for _ in 0..10 {
flush_sync().await;
wait_for_next_render().await;
println!("Task 1 recved");
channel.recv().await.unwrap();
println!("Task 1");
Expand All @@ -116,7 +116,7 @@ async fn flushing() {
spawn(async move {
let mut channel = BROADCAST.with(|b| b.1.resubscribe());
for _ in 0..10 {
flush_sync().await;
wait_for_next_render().await;
println!("Task 2 recved");
channel.recv().await.unwrap();
println!("Task 2");
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/use_future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::future::Future;

/// A hook that allows you to spawn a future.
/// This future will **not** run on the server
/// The future is spawned on the next call to `flush_sync` which means that it will not run on the server.
/// The future is spawned on the next call to `wait_for_next_render` which means that it will not run on the server.
/// To run a future on the server, you should use `spawn` directly.
/// `use_future` **won't return a value**.
/// If you want to return a value from a future, use `use_resource` instead.
Expand Down

0 comments on commit d7ef43e

Please sign in to comment.