Skip to content

Conversation

@baloo
Copy link
Contributor

@baloo baloo commented Nov 5, 2025

  • Added a CHANGELOG.md entry

Summary

This provide a fork method to "clone" an Rng.

Motivation

This is handy to initialize an Rng that needs to be given to another thread for example.

rand_chacha used to provide a clonable Chacha20Rng (arguably incorrect). chacha20::Chacha20Rng is not clonable. But it's convenient to fork RNGs when initializing a thread or whatnot.

Details

This provide a fork method to "clone" an Rng. This is handy to
initialize an Rng that needs to be given to another thread for example.
@newpavlov newpavlov merged commit 4e856da into rust-random:master Nov 6, 2025
13 checks passed
@baloo baloo deleted the baloo/seedablerng/fork branch November 6, 2025 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants