Skip to content

Add a note about OsRng blocking in early init.#134

Merged
alexcrichton merged 2 commits intorust-random:masterfrom
tomprince:nonblocking-note
Feb 27, 2017
Merged

Add a note about OsRng blocking in early init.#134
alexcrichton merged 2 commits intorust-random:masterfrom
tomprince:nonblocking-note

Conversation

@tomprince
Copy link
Contributor

Fixes #132.

src/os.rs Outdated
/// This does not block.
/// This usually does not block. On some systems (e.g. FreeBSD, OpenBSD,
/// Max OS X, and modern Linux) this may block very early in the init
/// process, if the CSPRNG has not seeded yet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "has not been seeded" or "is not seeded".

In my opinion, a source/reference would be great to back this up and provide further reading.

Overall, this is good info to have in the documentation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For instance, a link to the PEP metioned in #132 could be useful.

@tomprince
Copy link
Contributor Author

I think I've addressed all the comments.

@alexcrichton alexcrichton merged commit dac5cab into rust-random:master Feb 27, 2017
@alexcrichton
Copy link
Contributor

Thanks!

pitdicker pushed a commit to pitdicker/rand that referenced this pull request Apr 4, 2018
Add a note about `OsRng` blocking in early init.
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