Connecting Tech Pros Worldwide Help | Site Map

Threading Vs Delegates

rb531
Guest
 
Posts: n/a
#1: Nov 16 '05
Guys,

I am struck up with a dilemma whether to use threading or delgates for
asynchronous processing. Can anyone throw some light on this?

Please let me know which one is better.

Thanks
Harris Reynolds
Guest
 
Posts: n/a
#2: Nov 16 '05

re: Threading Vs Delegates


Definitely use delegates. Delegates will save you a lot of effort and likely will perform better than a home grown solution. In case this isn't common knowledge, with delegates asynchronous processing is built-in with the BeginInvoke/EndInvoke methods inherent in your delegate instance.

~harris

"rb531" wrote:
[color=blue]
> Guys,
>
> I am struck up with a dilemma whether to use threading or delgates for
> asynchronous processing. Can anyone throw some light on this?
>
> Please let me know which one is better.
>
> Thanks
>[/color]
Michael C
Guest
 
Posts: n/a
#3: Nov 16 '05

re: Threading Vs Delegates


Delegates do have limitations, as they use the common thread pool, but they
make asynchronous programming so much easier. Unless you need more threads
than are available in the thread pool, or need more precise control over
thread execution, definitely use delegates.

Michael C.

"Harris Reynolds" <HarrisReynolds@discussions.microsoft.com> wrote in
message news:C2487A39-5A0B-42A1-A881-B9B4A303BA64@microsoft.com...[color=blue]
> Definitely use delegates. Delegates will save you a lot of effort and[/color]
likely will perform better than a home grown solution. In case this isn't
common knowledge, with delegates asynchronous processing is built-in with
the BeginInvoke/EndInvoke methods inherent in your delegate instance.[color=blue]
>
> ~harris
>
> "rb531" wrote:
>[color=green]
> > Guys,
> >
> > I am struck up with a dilemma whether to use threading or delgates for
> > asynchronous processing. Can anyone throw some light on this?
> >
> > Please let me know which one is better.
> >
> > Thanks
> >[/color][/color]


Closed Thread