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
//!
@@ -871,11 +870,10 @@ pub struct ThreadRng {
871
870
}
872
871
873
872
/// Retrieve the lazily-initialized thread-local random number
874
- /// generator, seeded by the system . Intended to be used in method
873
+ /// generator. Intended to be used in method
875
874
/// chaining style, e.g. `thread_rng().gen::<i32>()`.
876
875
///
877
- /// The RNG provided will reseed itself from the operating system
878
- /// after generating a certain amount of randomness.
876
+ /// The RNG provided will use an operating-system source of randomness.
879
877
pub fn thread_rng ( ) -> ThreadRng {
880
878
// used to make space in TLS for a random number generator
881
879
thread_local ! ( static THREAD_RNG_KEY : Rc <RefCell <ThreadRngInner >> = {
You can’t perform that action at this time.
0 commit comments