|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
confusing remark in MSDN Control.BeginInvoke() docControl.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 <=?Utf-8?B?Sm9lIERveWxl?= <Joe Do***@discussions.microsoft.com>>
wrote: Show quoteHide quote > I've read a bit about the differences between delegate's BeginInvoke and No, it's just a doc error. I think it's been reported before, but I'll > 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. check so that it should be fixed by the time .NET 2.0 comes out. -- Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
Other interesting topics
Re-flunk-tion!
ASP.NET 2.0 Maintain Scroll Position on PostBack with Mozilla FIREFOX in the works? Starting up application from dll. ANN: Bob Powell's Beginners Guide to GDI+ Monitor (lock) storing the username and password information Application Error Version of .Net.... RE: is there an instruction in VB.NET .net framework 1.1 installation on Windows NT 4 with SBS |
|||||||||||||||||||||||