diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-07 11:13:26 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-11 10:00:43 -0700 |
| commit | b1c9ce9c6f0eb7d4a7df1aad6b6799f4b548181c (patch) | |
| tree | 219196013c141f0f2110ac1df21db05433a71e4b /src/test/bench/shootout-regex-dna.rs | |
| parent | c690191a84728c289a4b3dc17b07934a66311d9d (diff) | |
| download | rust-b1c9ce9c6f0eb7d4a7df1aad6b6799f4b548181c.tar.gz rust-b1c9ce9c6f0eb7d4a7df1aad6b6799f4b548181c.zip | |
sync: Move underneath libstd
This commit is the final step in the libstd facade, #13851. The purpose of this commit is to move libsync underneath the standard library, behind the facade. This will allow core primitives like channels, queues, and atomics to all live in the same location. There were a few notable changes and a few breaking changes as part of this movement: * The `Vec` and `String` types are reexported at the top level of libcollections * The `unreachable!()` macro was copied to libcore * The `std::rt::thread` module was moved to librustrt, but it is still reexported at the same location. * The `std::comm` module was moved to libsync * The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`. It is now a private module with types/functions being reexported under `sync::comm`. This is a breaking change for any existing users of duplex streams. * All concurrent queues/deques were moved directly under libsync. They are also all marked with #![experimental] for now if they are public. * The `task_pool` and `future` modules no longer live in libsync, but rather live under `std::sync`. They will forever live at this location, but they may move to libsync if the `std::task` module moves as well. [breaking-change]
Diffstat (limited to 'src/test/bench/shootout-regex-dna.rs')
| -rw-r--r-- | src/test/bench/shootout-regex-dna.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/bench/shootout-regex-dna.rs b/src/test/bench/shootout-regex-dna.rs index ca0248bcf5d..64f3e633d03 100644 --- a/src/test/bench/shootout-regex-dna.rs +++ b/src/test/bench/shootout-regex-dna.rs @@ -47,11 +47,10 @@ extern crate regex; #[phase(plugin)]extern crate regex_macros; -extern crate sync; use std::io; use regex::{NoExpand, Regex}; -use sync::Arc; +use std::sync::{Arc, Future}; fn count_matches(seq: &str, variant: &Regex) -> int { let mut n = 0; @@ -75,7 +74,7 @@ fn main() { let seq_arc = Arc::new(seq.clone()); // copy before it moves let clen = seq.len(); - let mut seqlen = sync::Future::spawn(proc() { + let mut seqlen = Future::spawn(proc() { let substs = ~[ (regex!("B"), "(c|g|t)"), (regex!("D"), "(a|g|t)"), @@ -111,7 +110,7 @@ fn main() { for variant in variants.move_iter() { let seq_arc_copy = seq_arc.clone(); variant_strs.push(variant.to_str().to_owned()); - counts.push(sync::Future::spawn(proc() { + counts.push(Future::spawn(proc() { count_matches(seq_arc_copy.as_slice(), &variant) })); } |
