public void Update(object sender, BlockReadEventArgs e) { if (!ValidateTimer()) return; Dispatcher.BeginInvoke(new Action(() => { if (_mutex.WaitOne(10) == false) return; OnUpdate(e.DataLeft, e.DataRight); _mutex.ReleaseMutex(); })/*, System.Windows.Threading.DispatcherPriority.Render*/); }
public void Update(object sender, BlockReadEventArgs e) { if (!ValidateTimer()) { return; } Dispatcher.BeginInvoke(new Action(() => { if (_mutex.WaitOne(10) == false) { return; } OnUpdate(e.DataLeft, e.DataRight); _mutex.ReleaseMutex(); }) /*, System.Windows.Threading.DispatcherPriority.Render*/); }