File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ use crate::ThreadPoolBuilder;
33use crate :: { scope, scope_fifo, Scope , ScopeFifo } ;
44use rand:: { Rng , SeedableRng } ;
55use rand_xorshift:: XorShiftRng ;
6- use std:: cmp;
76use std:: iter:: once;
87use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
98use std:: sync:: { Barrier , Mutex } ;
@@ -182,7 +181,7 @@ fn the_final_countdown<'scope>(
182181 let diff = if p > q { p - q } else { q - p } ;
183182
184183 let mut data = max. lock ( ) . unwrap ( ) ;
185- * data = cmp :: max ( diff, * data) ;
184+ * data = Ord :: max ( diff, * data) ;
186185
187186 if n > 0 {
188187 s. spawn ( move |s| the_final_countdown ( s, bottom_of_stack, max, n - 1 ) ) ;
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ impl AtomicCounters {
166166 // Current heuristic: whenever an inactive thread goes away, if
167167 // there are any sleeping threads, wake 'em up.
168168 let sleeping_threads = old_value. sleeping_threads ( ) ;
169- std :: cmp :: min ( sleeping_threads, 2 )
169+ Ord :: min ( sleeping_threads, 2 )
170170 }
171171
172172 /// Subtracts a sleeping thread. This cannot fail, but it is only
Original file line number Diff line number Diff line change @@ -328,10 +328,10 @@ impl Sleep {
328328 // -- clearly the existing idle jobs aren't enough. Otherwise,
329329 // check to see if we have enough idle workers.
330330 if !queue_was_empty {
331- let num_to_wake = std :: cmp :: min ( num_jobs, num_sleepers) ;
331+ let num_to_wake = Ord :: min ( num_jobs, num_sleepers) ;
332332 self . wake_any_threads ( num_to_wake) ;
333333 } else if num_awake_but_idle < num_jobs {
334- let num_to_wake = std :: cmp :: min ( num_jobs - num_awake_but_idle, num_sleepers) ;
334+ let num_to_wake = Ord :: min ( num_jobs - num_awake_but_idle, num_sleepers) ;
335335 self . wake_any_threads ( num_to_wake) ;
336336 }
337337 }
You can’t perform that action at this time.
0 commit comments