I've read a bit about the differences between delegate's BeginInvoke and
Control.BeginInvoke, and it sounds like Control's BeginInvoke() ensures that
the delegate is invoked in the thread that created the Control's context.
This implies no thread pool threads are involved. A test app bore this out.

What confuses is me is this note found in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassbegininvoketopic2.asp:

Note The BeginInvoke method calls the specified delegate back on a
different thread pool thread. You should not block a thread pool thread for
any length of time.

Why does the Control.BeginInvoke() documentation mention thread pool
threads? Are they somehow involved with multi-threaded control programming (I
hope not)? Is it just a doc error? Does the "back" in "calls the specified
delegate back" refer to some other callback delegate that isn't mentioned?
Don't even get me started on the second sentence.

TIA

Re: confusing remark in MSDN Control.BeginInvoke() doc by Jon

Jon
Wed Nov 24 02:18:22 CST 2004

<=?Utf-8?B?Sm9lIERveWxl?= <Joe Doyle@discussions.microsoft.com>>
wrote:
> I've read a bit about the differences between delegate's BeginInvoke and
> Control.BeginInvoke, and it sounds like Control's BeginInvoke() ensures that
> the delegate is invoked in the thread that created the Control's context.
> This implies no thread pool threads are involved. A test app bore this out.
>
> What confuses is me is this note found in
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpre
> f/html/frlrfsystemwindowsformscontrolclassbegininvoketopic2.asp:
>
> Note The BeginInvoke method calls the specified delegate back on a
> different thread pool thread. You should not block a thread pool thread for
> any length of time.
>
> Why does the Control.BeginInvoke() documentation mention thread pool
> threads? Are they somehow involved with multi-threaded control programming (I
> hope not)? Is it just a doc error? Does the "back" in "calls the specified
> delegate back" refer to some other callback delegate that isn't mentioned?
> Don't even get me started on the second sentence.

No, it's just a doc error. I think it's been reported before, but I'll
check so that it should be fixed by the time .NET 2.0 comes out.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too