Hello!
I have a GUI-instance recieving an event call via remoting. I know
that those events are handled in a seperate thread, therefore I invoke
them using the forms BeginInvoke() method.
public void UpdateDisplay(string value)
{
if (this._displayBox.InvokeRequired)
this.BeginInvoke(new
DisplayChangedHandler(this.UpdateDisplay), new object[] { value });
else
this._displayBox.Text = value;
}
(DisplayChangedHandler is simply a delegate with a string parameter.)
Let's come to the point:
I wondered why the GUI ever takes a moment until it's "enabled" again
and changes are done. I looked more closely and found out, that the
invocation of the delegate takes 1 second(an average of 1.009 seconds
to be exact).
It's not that I have a great problem with that - I'd just like to know
the reason of the delay.
I checked if it's caused by other operations following the event, but
there's nothing that would take this "long".
It would be great if someone could brighten me :)
Greetings,
Chris
ChrisWF - 11 Jun 2008 14:36 GMT
> Hello!
>
[quoted text clipped - 27 lines]
> Greetings,
> Chris
Ok.... forget this... I must've been completly blind!
When I tried something earlier I had a Thread.Sleep(1000) there.
I still wonder how I could've overseen this really obvious cause of
delay.