-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match the behavior of SystemRandomSource to System.Random #886
base: master
Are you sure you want to change the base?
Conversation
Match the behavior of "SystemRandomSource" to "System.Random" dotnet/runtime#47085
Related: doesn't .NET 6 also introduce a shared Random instance? Maybe that could be useful for us also. |
Note, the reason we pass in a seed is to avoid the problem Random used to have when you create multiple instances very quickly they are not guaranteed to be independent (they could end up with the same seed). Is this also resolved then in .NET 6? |
When #885 is merged, I will issue the following commit pull request. |
https://docs.microsoft.com/dotnet/api/system.random.-ctor#System_Random__ctor
The |
Fixed a seed value issue in the .NET Framework.
Fixed. |
I have not merged yet because I first would like to bring out v5 which mainly changes a few things around native providers and how they are isolated, loaded an packaged (and make them work again for Linux if possible). As soon as this is out, we can finally start to move towards .NET 5 and 6. Sorry for this delay. |
In
.NET 6
,new System.Random()
with no arguments is changed toxoshiro256**
.dotnet/runtime#47085