G
Guest
Hello,
If I understand BeginInvoke correctly, when it is called your delegate is
run on a thread pool thread. Now, if you supplied a callback delegate, that
too is called on the same thread pool thread.
My question is this: Do I ever need to check the value of InvokeRequired in
my callback method before working with some GUI controls? Won't it always be
required since the callback is running on a thread pool thread? I see some
code examples of asynch calling and the examples usually have an
InvokeRequired check in the callback before doing any GUI work. It just
seems that that call wouldn't be necessary.
Thanks.
If I understand BeginInvoke correctly, when it is called your delegate is
run on a thread pool thread. Now, if you supplied a callback delegate, that
too is called on the same thread pool thread.
My question is this: Do I ever need to check the value of InvokeRequired in
my callback method before working with some GUI controls? Won't it always be
required since the callback is running on a thread pool thread? I see some
code examples of asynch calling and the examples usually have an
InvokeRequired check in the callback before doing any GUI work. It just
seems that that call wouldn't be necessary.
Thanks.