Skip to content

Commit

Permalink
Fixes #46. Thread deadlock can appear with large/many static field Fa…
Browse files Browse the repository at this point in the history
…ker initializations.
  • Loading branch information
bchavez committed Dec 7, 2016
1 parent 68c29d8 commit 91db58b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Source/Bogus/Randomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Randomizer
/// </summary>
public static Random Seed = new Random();

internal static Lazy<object> Locker = new Lazy<object>(() => new object(), LazyThreadSafetyMode.PublicationOnly);
internal static Lazy<object> Locker = new Lazy<object>(() => new object(), LazyThreadSafetyMode.ExecutionAndPublication);

/// <summary>
/// Get an int from 0 to max.
Expand Down

0 comments on commit 91db58b

Please sign in to comment.