I have a stream that removes data from a queue and writes it to another STDIN application. I use Stream, but with .Write and even .BeginWrite, when I send 1 MB of fragments to the second application, my GUI becomes ~ 1 sec behind. What for? My callbacks look something like this:
void Progress(object sender, ProgressArgs e) {
if (this.InvokeRequired) {
this.BeginInvoke(new MethodInvoker(delegate() { Progress(sender, e); }));
return;
}
progressBar1.Value = (int) e.PercentDone;
}
blez source
share