phobos icon indicating copy to clipboard operation
phobos copied to clipboard

Refactor `std.internal.entropy` to provide reusable handles

Open 0xEAB opened this issue 4 months ago • 1 comments

Refactor std.internal.entropy to provide reusable handles.

This allows a more efficient use of the module on certain platforms (for future code). To be fair, it might also make it slightly less efficient on others (e.g. Windows), though I think the reduction of TLS variables there might also be an improvement.

Please do not merge this yet. It needs further testing (that I haven’t performed yet). Also, I’d prefer v2.112.0 to have the non-handle version of module which should be easier to deal with in case of any regressions that may arise.

0xEAB avatar Aug 10 '25 03:08 0xEAB

Thanks for your pull request, @0xEAB!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#10843"

dlang-bot avatar Aug 10 '25 03:08 dlang-bot