Merge pull request #1235 from Demonthos/fix-use-future-looping

Fix use_future always spawning a new task and never updating
This commit is contained in:
Jonathan Kelley 2023-07-21 13:59:56 -07:00 committed by GitHub
commit b36a7a3993
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,8 +52,14 @@ where
val.set(Some(fut.await));
task.take();
})));
// Mark that we don't need to regenerate
state.needs_regen.set(false);
}
// update the current value
state.state.current_val = val.current_val.clone();
state
}