We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9eb2056 commit 3497195Copy full SHA for 3497195
src/ticked_async_executor.rs
@@ -64,6 +64,10 @@ where
64
pub fn tick_channel(&self) -> tokio::sync::watch::Receiver<f64> {
65
self.spawner.tick_channel()
66
}
67
+
68
+ pub fn wait_till_completed(&self, delta: f64) {
69
+ self.ticker.wait_till_completed(delta);
70
+ }
71
72
73
#[cfg(test)]
@@ -136,9 +140,7 @@ mod tests {
136
140
assert_eq!(executor.num_tasks(), 3);
137
141
138
142
// Since we have cancelled the tasks above, the loops should eventually end
139
- while executor.num_tasks() != 0 {
- executor.tick(DELTA, None);
- }
143
+ executor.wait_till_completed(DELTA);
144
145
146
#[test]
0 commit comments