File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ public static class EverythingApi
19
19
20
20
private const int BufferSize = 4096 ;
21
21
22
- private static SemaphoreSlim _semaphore = new SemaphoreSlim ( 1 , 1 ) ;
22
+ private static SemaphoreSlim _semaphore = new ( 1 , 1 ) ;
23
23
// cached buffer to remove redundant allocations.
24
- private static readonly StringBuilder buffer = new StringBuilder ( BufferSize ) ;
24
+ private static readonly StringBuilder buffer = new ( BufferSize ) ;
25
25
26
26
public enum StateCode
27
27
{
@@ -118,14 +118,13 @@ public static async IAsyncEnumerable<SearchResult> SearchAsync(EverythingSearchO
118
118
119
119
if ( option . MaxCount < 0 )
120
120
throw new ArgumentOutOfRangeException ( nameof ( option . MaxCount ) , option . MaxCount , "MaxCount must be greater than or equal to 0" ) ;
121
-
122
- await _semaphore . WaitAsync ( token ) ;
123
-
124
- if ( token . IsCancellationRequested )
125
- yield break ;
126
-
121
+
127
122
try
128
123
{
124
+ await _semaphore . WaitAsync ( token ) ;
125
+
126
+ if ( token . IsCancellationRequested )
127
+ yield break ;
129
128
130
129
if ( option . Keyword . StartsWith ( "@" ) )
131
130
{
You can’t perform that action at this time.
0 commit comments