File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 39
39
//!
40
40
//! There is built-in support for a RNG associated with each thread stored
41
41
//! in thread-local storage. This RNG can be accessed via `thread_rng`, or
42
- //! used implicitly via `random`. This RNG is normally randomly seeded
43
- //! from an operating-system source of randomness, e.g. `/dev/urandom` on
44
- //! Unix systems, and will automatically reseed itself from this source
45
- //! after generating 32 KiB of random data.
42
+ //! used implicitly via `random`. This RNG normally uses
43
+ //! an operating-system source of randomness, e.g. `/dev/urandom` on
44
+ //! Unix systems.
46
45
//!
47
46
//! # Cryptographic security
48
47
//!
@@ -864,11 +863,10 @@ pub struct ThreadRng {
864
863
}
865
864
866
865
/// Retrieve the lazily-initialized thread-local random number
867
- /// generator, seeded by the system . Intended to be used in method
866
+ /// generator. Intended to be used in method
868
867
/// chaining style, e.g. `thread_rng().gen::<i32>()`.
869
868
///
870
- /// The RNG provided will reseed itself from the operating system
871
- /// after generating a certain amount of randomness.
869
+ /// The RNG provided will use an operating-system source of randomness.
872
870
pub fn thread_rng ( ) -> ThreadRng {
873
871
// used to make space in TLS for a random number generator
874
872
thread_local ! ( static THREAD_RNG_KEY : Rc <RefCell <ThreadRngInner >> = {
You can’t perform that action at this time.
0 commit comments