Skip to content

Commit

Permalink
Prevent props loading while processing operations
Browse files Browse the repository at this point in the history
  • Loading branch information
hez2010 committed Sep 3, 2021
1 parent dde6182 commit 18e0e87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Files/ViewModels/ItemViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,8 @@ private async void ProcessOperationQueue(CancellationToken cancellationToken)
if (await operationEvent.WaitAsync(200, cancellationToken))
{
operationEvent.Reset();
itemLoadEvent.Reset();

while (operationQueue.TryDequeue(out var operation))
{
if (cancellationToken.IsCancellationRequested) break;
Expand Down Expand Up @@ -1851,6 +1853,8 @@ private async void ProcessOperationQueue(CancellationToken cancellationToken)
anyEdits = false;
}
}

itemLoadEvent.Set();
}

if (anyEdits && sampler.CheckNow())
Expand Down

0 comments on commit 18e0e87

Please sign in to comment.