Skip to content

Commit 7559260

Browse files
committed
small change, and test ci
1 parent 7b8b3af commit 7559260

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

timely/src/worker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ impl<A: Allocate> Worker<A> {
415415
/// worker.step_while(|| probe.less_than(&0));
416416
/// });
417417
/// ```
418-
pub fn step_while<F: FnMut()->bool>(&mut self, mut func: F) {
419-
while func() { self.step(); }
418+
pub fn step_while<F: FnMut()->bool>(&mut self, func: F) {
419+
self.step_or_park_while(Some(Duration::from_secs(0)), func)
420420
}
421421

422422
/// Calls `self.step_or_park(duration)` as long as `func` evaluates to true.

0 commit comments

Comments
 (0)