Skip to content

Commit 8c187a6

Browse files
authored
Long Running Operations: Ensure eager write lock (#21113)
Use EagerWriteLock for long running operations Switch from WriteLock to EagerWriteLock when acquiring the lock for long running operations to ensure proper lock acquisition timing.
1 parent e08d80f commit 8c187a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Umbraco.Core/Services/LongRunningOperationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ private async Task<Attempt<Guid, LongRunningOperationEnqueueStatus>> RunInner<T>
128128
{
129129
// Acquire a write lock to ensure that no other operations of the same type can be enqueued while this one is being processed.
130130
// This is only needed if we do not allow multiple runs of the same type.
131-
scope.WriteLock(Constants.Locks.LongRunningOperations);
131+
scope.EagerWriteLock(Constants.Locks.LongRunningOperations);
132132
if (await IsAlreadyRunning(type))
133133
{
134134
scope.Complete();

0 commit comments

Comments
 (0)