namespace UnityHelpers.Core.Random { using System.Threading; public static class ThreadLocalRandom where T : IRandom, new() { private static readonly ThreadLocal RandomCache = new ThreadLocal(() => new T()); public static T Instance => RandomCache.Value; } }