From f96bf4c59210a4d43ef9ad8948fa8e128e237081 Mon Sep 17 00:00:00 2001 From: TheBestPessimist Date: Fri, 3 Mar 2023 14:35:08 +0200 Subject: [PATCH] cleanup --- .../Search/Everything/EverythingAPI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs index 3efd09c4d..2a007cd73 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs @@ -17,7 +17,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything { private const int BufferSize = 4096; - private static SemaphoreSlim _semaphore = new(1, 1); + private static readonly SemaphoreSlim _semaphore = new(1, 1); // cached buffer to remove redundant allocations. private static readonly StringBuilder buffer = new(BufferSize); @@ -78,7 +78,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything if (option.MaxCount < 0) throw new ArgumentOutOfRangeException(nameof(option.MaxCount), option.MaxCount, "MaxCount must be greater than or equal to 0"); - + await _semaphore.WaitAsync(token);