Skip to content

Commit 08df557

Browse files
committed
Change BlockingConcurrentDequeue to provide IsEmpty property
1 parent fe6a142 commit 08df557

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
@@ -36,7 +36,7 @@ public BlockingConcurrentDeque()
3636
};
3737
}
3838

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

4141
public void Prepend(T item)
4242
{

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

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

692-
if (!runPipelineForEventProcessing && _taskQueue.Count == 0)
692+
if (!runPipelineForEventProcessing && _taskQueue.IsEmpty)
693693
{
694694
return;
695695
}

0 commit comments

Comments
 (0)