]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #20264: nagisa/threadrng
authorAlex Crichton <alex@alexcrichton.com>
Tue, 30 Dec 2014 00:36:29 +0000 (16:36 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 30 Dec 2014 00:36:29 +0000 (16:36 -0800)
Since runtime is removed, rust has no tasks anymore and everything is moving
from being task-* to thread-*. Let’s rename TaskRng as well!

This is a breaking change. If a breaking change for consistency is not desired, feel free to close.

1  2 
src/libcollections/slice.rs
src/libstd/os.rs
src/libstd/sync/rwlock.rs

Simple merge
Simple merge
index 29cc1f8563f9a9d4671ee5e9e5e5ae14e563b9c8,7b6a6be78852607cf2c74b3fe6c3b8c14a2c5f7d..1b7a7f3f323a8822725dbe71299a750156b309ff
@@@ -388,12 -394,12 +388,12 @@@ mod tests 
          for _ in range(0, N) {
              let tx = tx.clone();
              spawn(move|| {
-                 let mut rng = rand::task_rng();
+                 let mut rng = rand::thread_rng();
                  for _ in range(0, M) {
                      if rng.gen_weighted_bool(N) {
 -                        drop(R.write());
 +                        drop(R.write().unwrap());
                      } else {
 -                        drop(R.read());
 +                        drop(R.read().unwrap());
                      }
                  }
                  drop(tx);