Add thread safety

This commit is contained in:
Michael Bucari-Tovo 2025-07-23 17:00:36 -06:00
parent 2f082a9656
commit 08aebf8ecf

View File

@ -38,9 +38,20 @@ namespace LibationWinForms.ProcessQueue
} }
public void RefreshDisplay() public void RefreshDisplay()
{
if (InvokeRequired)
{
Invoke((MethodInvoker)delegate
{ {
AdjustScrollBar(); AdjustScrollBar();
DoVirtualScroll(); DoVirtualScroll();
});
}
else
{
AdjustScrollBar();
DoVirtualScroll();
}
} }
#region Dynamic Properties #region Dynamic Properties