Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions timely/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ impl<A: Allocate> Worker<A> {
/// worker.step_while(|| probe.less_than(&0));
/// });
/// ```
pub fn step_while<F: FnMut()->bool>(&mut self, mut func: F) {
while func() { self.step(); }
pub fn step_while<F: FnMut()->bool>(&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.
Expand Down