Random Sources.Shared Property
Gets a thread-safe, high-performance random source intended for convenience and incidental use.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public static ThreadSafeRandomSource Shared { get; }Property Value
ThreadSafeRandomSourceRemarks
This source is safe to use concurrently. The implementation uses thread-local storage (TLS), similar to System.Random.Shared.
For reproducible results, create and pass a seeded RNG using Create(Int64).