This repository was archived by the owner on Apr 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ version = "2.29.2"
26
26
27
27
[dependencies ]
28
28
colored = " 1.6.0"
29
- crossbeam = " 0.4.1 "
29
+ crossbeam = " 0.5.0 "
30
30
glob = " 0.2.11"
31
31
lazy_static = " 1.0.0"
32
32
nom = " 3.2"
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ extern crate walkdir;
4
4
pub mod single_threaded;
5
5
6
6
use self :: crossbeam:: deque:: fifo;
7
+ use self :: crossbeam:: deque:: Pop ;
8
+ use self :: crossbeam:: deque:: Steal ;
7
9
use self :: crossbeam:: deque:: Worker ;
8
10
use self :: walkdir:: WalkDir ;
9
11
use colored:: * ;
@@ -375,11 +377,11 @@ pub fn print_parallel(w: Walk) -> () {
375
377
376
378
// start popping off values in the worker's thread
377
379
loop {
378
- if let Some ( p) = worker. pop ( ) {
380
+ if let Pop :: Data ( p) = worker. pop ( ) {
379
381
match p {
380
382
Status :: Data ( d) => Walk :: print_dir ( & d, & arc_local) ,
381
383
_ => break ,
382
- } ;
384
+ }
383
385
}
384
386
}
385
387
} ) ;
@@ -397,11 +399,11 @@ pub fn print_parallel(w: Walk) -> () {
397
399
398
400
// run the stealer in a new thread
399
401
let child_consumer = thread:: spawn ( move || loop {
400
- if let Some ( p) = stealer_clone. steal ( ) {
402
+ if let Steal :: Data ( p) = stealer_clone. steal ( ) {
401
403
match p {
402
404
Status :: Data ( d) => Walk :: print_dir ( & d, & arc_local) ,
403
405
_ => break ,
404
- } ;
406
+ }
405
407
}
406
408
} ) ;
407
409
You can’t perform that action at this time.
0 commit comments