Setup CPU watcher on non-UI thread

This commit is contained in:
2014-05-14 18:29:18 -04:00
parent 89b4ef0c6a
commit a60f844acd
2 changed files with 8 additions and 4 deletions

View File

@@ -32,9 +32,9 @@ namespace ProcessCpuUsageStatusWindow
#region Initialize and terminate
public void Initialize(TimeSpan updateInterval, ProcessListUpdatedDelegate callback)
public void Initialize(TimeSpan updateInterval, ProcessListUpdatedDelegate callback, Dispatcher dispatcher)
{
_dispatcher = Dispatcher.CurrentDispatcher;
_dispatcher = dispatcher;
// Create a new dictionary for the process list
CurrentProcessList = new Dictionary<string, ProcessCpuUsage>();