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

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