diff --git a/timely/src/worker.rs b/timely/src/worker.rs index a07b9e4e4..93e0fc3f6 100644 --- a/timely/src/worker.rs +++ b/timely/src/worker.rs @@ -415,8 +415,8 @@ impl Worker { /// worker.step_while(|| probe.less_than(&0)); /// }); /// ``` - pub fn step_whilebool>(&mut self, mut func: F) { - while func() { self.step(); } + pub fn step_whilebool>(&mut self, func: F) { + self.step_or_park_while(Some(Duration::from_secs(0)), func) } /// Calls `self.step_or_park(duration)` as long as `func` evaluates to true.