Skip to content

Commit

Permalink
Use Task Delay instead of Thread.Sleep (umbraco#18119)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonElkin authored Jan 27, 2025
1 parent ff44cf3 commit 1395d49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Umbraco.Infrastructure/Runtime/FileSystemMainDomLock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void CreateLockReleaseSignalFile() =>
public void DeleteLockReleaseSignalFile() =>
File.Delete(_releaseSignalFilePath);

private void ListeningLoop()
private async Task ListeningLoop()
{
while (true)
{
Expand All @@ -132,7 +132,7 @@ private void ListeningLoop()
break;
}

Thread.Sleep(_globalSettings.CurrentValue.MainDomReleaseSignalPollingInterval);
await Task.Delay(_globalSettings.CurrentValue.MainDomReleaseSignalPollingInterval);
}
}
}

0 comments on commit 1395d49

Please sign in to comment.