mozilla/rust — pull request #3639 by dbp (2012-10-02 03:38:16+00:00)
Title: core::rand - adding task local lazily initialized rng, as per #3439

This adds a task-local random number generator, seeded by the system, as per this issue: https://github.com/mozilla/rust/issues/3439. The intended use is like:

rand::task_rng().gen_int()

Though of course you could do:

let rng : Rng = rand::task_rng();
rng.shuffle(...);