fixed multi-threading issues with HighlightedListViewItem

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2512 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
wj32
2009-12-26 22:06:03 +00:00
parent 6d2786388c
commit 0effa02be1
2 changed files with 15 additions and 6 deletions
+1
View File
@@ -8,6 +8,7 @@ Process Hacker
* #2920711 - "Value was either too large or too small for an Int32."
* #2920734 - "Found a reproducible bug : Value does not fall within..."
* Missing service descriptions in dumps
* Multi-threading issues with highlighting
1.9
* NEW/IMPROVED:
@@ -95,8 +95,11 @@ namespace ProcessHacker.UI
// Execute the pre-queue items.
_list.BeginUpdate();
while (_preQueue.Count > 0)
_preQueue.Dequeue().Invoke();
lock (_preQueue)
{
while (_preQueue.Count > 0)
_preQueue.Dequeue().Invoke();
}
_list.EndUpdate();
@@ -111,8 +114,11 @@ namespace ProcessHacker.UI
{
_list.BeginUpdate();
while (_queue.Count > 0)
_queue.Dequeue().Invoke();
lock (_queue)
{
while (_queue.Count > 0)
_queue.Dequeue().Invoke();
}
_list.EndUpdate();
}));
@@ -125,12 +131,14 @@ namespace ProcessHacker.UI
public void Enqueue(MethodInvoker method)
{
_queue.Enqueue(method);
lock (_queue)
_queue.Enqueue(method);
}
public void EnqueuePre(MethodInvoker method)
{
_preQueue.Enqueue(method);
lock (_preQueue)
_preQueue.Enqueue(method);
}
public void Dispose()