sometime is ok but sometime is very slow. why?
void function(PassVehicleInfo vehicle)
{ //a
System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() =>
{//b
//do something
}));
}
run from a
to b
sometimes cost 1xx ms
,sometimes cost 8 s
.