Skip to content

Commit

Permalink
Reuse _assembleLocker
Browse files Browse the repository at this point in the history
  • Loading branch information
Leh2 committed Apr 9, 2024
1 parent 48d2cdc commit f94e9b8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using JasperFx.CodeGeneration;
using JasperFx.CodeGeneration.Model;
using JasperFx.Core;
Expand All @@ -18,13 +19,11 @@ namespace Marten.Events.Aggregation;

public abstract partial class GeneratedAggregateProjectionBase<T>
{
private readonly object _compilationLock = new();

public ILiveAggregator<T> Build(StoreOptions options)
{
if (!_hasGenerated)
{
lock (_compilationLock)
lock (_assembleLocker)
{
if (!_hasGenerated)
{
Expand Down

0 comments on commit f94e9b8

Please sign in to comment.