|
| 1 | +From febff2a8c639efb5de1e1b4758cdb473847d80ce Mon Sep 17 00:00:00 2001 |
| 2 | + |
| 3 | +Date: Tue, 30 Jul 2019 12:12:37 +0200 |
| 4 | +Subject: [PATCH] Disable threads in shootout-regex-dna example |
| 5 | + |
| 6 | +--- |
| 7 | + examples/shootout-regex-dna.rs | 4 ++-- |
| 8 | + 1 file changed, 2 insertions(+), 2 deletions(-) |
| 9 | + |
| 10 | +diff --git a/examples/shootout-regex-dna.rs b/examples/shootout-regex-dna.rs |
| 11 | +index 2171bb3..37382f8 100644 |
| 12 | +--- a/examples/shootout-regex-dna.rs |
| 13 | ++++ b/examples/shootout-regex-dna.rs |
| 14 | +@@ -37,7 +37,7 @@ fn main() { |
| 15 | + for variant in variants { |
| 16 | + let seq = seq_arc.clone(); |
| 17 | + let restr = variant.to_string(); |
| 18 | +- let future = thread::spawn(move || variant.find_iter(&seq).count()); |
| 19 | ++ let future = variant.find_iter(&seq).count(); |
| 20 | + counts.push((restr, future)); |
| 21 | + } |
| 22 | + |
| 23 | +@@ -60,7 +60,7 @@ fn main() { |
| 24 | + } |
| 25 | + |
| 26 | + for (variant, count) in counts { |
| 27 | +- println!("{} {}", variant, count.join().unwrap()); |
| 28 | ++ println!("{} {}", variant, count); |
| 29 | + } |
| 30 | + println!("\n{}\n{}\n{}", ilen, clen, seq.len()); |
| 31 | + } |
| 32 | +-- |
| 33 | +2.11.0 |
| 34 | + |
0 commit comments