fix
This commit is contained in:
1 parent
1737c55575
commit
d7f9a07f4e
3 files changed
+17
-2
No files matched your search
@@ -319,7 +319,9 @@ impl<'src> ScopeState {
|
||||
|
||||
/// Pushes the future onto the poll queue to be polled after the component renders.
|
||||
pub fn push_future(&self, fut: impl Future<Output = ()> + 'static) -> TaskId {
|
||||
self.tasks.spawn(self.id, fut)
|
||||
let id = self.tasks.spawn(self.id, fut);
|
||||
self.spawned_tasks.borrow_mut().insert(id);
|
||||
id
|
||||
}
|
||||
|
||||
/// Spawns the future but does not return the [`TaskId`]
|
||||
@@ -340,6 +342,8 @@ impl<'src> ScopeState {
|
||||
.unbounded_send(SchedulerMsg::TaskNotified(id))
|
||||
.expect("Scheduler should exist");
|
||||
|
||||
self.spawned_tasks.borrow_mut().insert(id);
|
||||
|
||||
id
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user