From 4917fb959e2befec07a693e72d7010c09494ec7c Mon Sep 17 00:00:00 2001 From: ningshuxia <ningshuxia0927@outlook.com> Date: 星期四, 03 四月 2025 15:38:34 +0800 Subject: [PATCH] 1.新增二输水流量压力偏差曲线 --- 02-desktop/Component/IStation.MemoryCache/Cache/SharedMemoryCache_Wipe.cs | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/02-desktop/Component/IStation.MemoryCache/Cache/SharedMemoryCache_Wipe.cs b/02-desktop/Component/IStation.MemoryCache/Cache/SharedMemoryCache_Wipe.cs index ee3a08d..e4cd773 100644 --- a/02-desktop/Component/IStation.MemoryCache/Cache/SharedMemoryCache_Wipe.cs +++ b/02-desktop/Component/IStation.MemoryCache/Cache/SharedMemoryCache_Wipe.cs @@ -13,17 +13,17 @@ /// </summary> public void Wipe() { - if (this._isWiping) { return; } + if (_isWiping) { return; } - lock (this._wipeLock) + lock (_wipeLock) { - if (this._isWiping) { return; } + if (_isWiping) { return; } - this._isWiping = true; + _isWiping = true; - SpinWait.SpinUntil(() => !this._isSetting); // wait until all running set operations are complete (new ones are blocked) + SpinWait.SpinUntil(() => !_isSetting); // wait until all running set operations are complete (new ones are blocked) - var keys = this._memoryCache.Select(x => x.Key); + var keys = _memoryCache.Select(x => x.Key); Parallel.ForEach(keys, x => ((IMemoryCacheDirect)this).Remove(x)); @@ -36,7 +36,7 @@ } finally { - this._isWiping = false; + _isWiping = false; } } } -- Gitblit v1.9.3