Skip to content

Commit 39f8e4c

Browse files
committed
Change BlockingConcurrentDequeue to provide IsEmpty property
1 parent 9144a77 commit 39f8e4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PowerShellEditorServices/Services/PowerShell/Execution/BlockingConcurrentDeque.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public BlockingConcurrentDeque()
3939
};
4040
}
4141

42-
public int Count => _queues[0].Count + _queues[1].Count;
42+
public bool IsEmpty => _queues[0].Count == 0 && _queues[1].Count == 0;
4343

4444
public void Prepend(T item)
4545
{

src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ private void OnPowerShellIdle()
691691
}
692692
}
693693

694-
if (!runPipelineForEventProcessing && _taskQueue.Count == 0)
694+
if (!runPipelineForEventProcessing && _taskQueue.IsEmpty)
695695
{
696696
return;
697697
}

0 commit comments

Comments
 (0)