prclot wrote at 2011-10-25 18:52:
When using a thread to update the pointseries and a dispatcher to redraw the plot the System systematically crashes after few iterations.
in the thread worker
public void Worker()
double x = counter * 0.1;
pointList.Add(new DataPoint(x, Math.Cos(100 * x * Math.PI / 180)));
object retVal = Dispatcher.BeginInvoke(new ThreadStart(() => Update()), DispatcherPriority.Normal, null);
private void Update()
Thanks to anybody
objo wrote at 2011-10-25 20:57:
did you try a lock on your plot model when you modify the points and when you refresh the plot?
prclot wrote at 2011-10-25 21:47:
i have already did that.
A lock in the update method and a lock in the worker
Same error in :
foreach (var o in itemsSource)
InvalidOperationException : the enumerator has been reset
Customer support service by UserEcho