Address new Rider inspections (EAP) (#2418)

This commit is contained in:
Łukasz Domeradzki
2021-10-01 01:21:09 +02:00
committed by GitHub
parent 99205fa278
commit 965d3050a5
8 changed files with 34 additions and 31 deletions

View File

@@ -58,6 +58,7 @@ namespace ArchiSteamFarm.Helpers {
}
void ICrossProcessSemaphore.Release() {
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
lock (LocalSemaphore) {
if (FileLock == null) {
throw new InvalidOperationException(nameof(FileLock));
@@ -78,6 +79,7 @@ namespace ArchiSteamFarm.Helpers {
try {
while (true) {
try {
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
lock (LocalSemaphore) {
if (FileLock != null) {
throw new InvalidOperationException(nameof(FileLock));
@@ -123,6 +125,7 @@ namespace ArchiSteamFarm.Helpers {
while (true) {
try {
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
lock (LocalSemaphore) {
if (FileLock != null) {
throw new InvalidOperationException(nameof(FileLock));