Let rand::rng()
use OsRng
unless thread_rng
is enabled?
#1545
Labels
E-question
Participation: opinions wanted
rand::rng()
use OsRng
unless thread_rng
is enabled?
#1545
ThreadRng
adds some thread-local memory. In case not all users want this, we could add athread_rng
feature flag (probably default-enabled).Where the
thread_rng
feature is not enabled,rand::rngs::ThreadRng
would not be available.rand::rng()
would instead useOsRng
(assuming thatgetrandom
is available), thusthread_rng
would mostly be a performance boost (at the cost of extra code and thread-local memory).The text was updated successfully, but these errors were encountered: