confusing remark in MSDN Control.BeginInvoke() doc

G

Guest

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/d...windowsformscontrolclassbegininvoketopic2.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
 
J

Jon Skeet [C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top