diff --git a/HISTORY.md b/HISTORY.md index b7c7fe66..125a8fc7 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,5 @@ ## v8.0.2 +* Issue 46. Fixed threading deadlock situation with static faker initialization. Thanks Mpdreamz. * Added `f => f.Generate(count, ()=> f.Phone.PhoneNumber())` helper for better fluency when filling properties with `List` of `T`. ## v8.0.1 diff --git a/Source/Bogus/Randomizer.cs b/Source/Bogus/Randomizer.cs index 545535e3..e010a7a2 100644 --- a/Source/Bogus/Randomizer.cs +++ b/Source/Bogus/Randomizer.cs @@ -19,7 +19,7 @@ public class Randomizer /// public static Random Seed = new Random(); - internal static Lazy Locker = new Lazy(() => new object(), LazyThreadSafetyMode.PublicationOnly); + internal static Lazy Locker = new Lazy(() => new object(), LazyThreadSafetyMode.ExecutionAndPublication); /// /// Get an int from 0 to max.