fred <an*******@discussions.microsoft.com> wrote:
I'm writing an application invoking asynchon methods.
I envision using the .NET thread pool since it matches
well my needs.
There is (at least) 2 methods to do that:
using ThreadPool class directely or using the BeginInvoke
() of a delegate.
Does anybody knows any advantages from one method to
another?
See
http://www.pobox.com/~skeet/csharp/t...readpool.shtml for
detailed comments, but:
o QueueUserWorkItem only allows a single parameter, of type object
o QueueUserWorkItem doesn't allow you to specify a callback
o QueueUserWorkItem doesn't require EndInvoke or anything similar
(The reverse is true for BeginInvoke in each case.)
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too