I was reading this question and answer by Hans but still I need a clarification.
AFAIK ,
The purpose of asynchronous methods is to allow many tasks to run on few threads; while the purpose of asynchronous delegates is to execute a task in parallel with the caller.
But regarding both asynchronous operations:
If the BeginInvoke
returns immediately to the caller (and it does with Asynchronous delegate) , so there must be other thread which actually do the job and signal when it finished.
So what is the difference between using that thread to a regular threadpool thread ? And I answer : only the fact that those threadpool threads are already there and waiting to be run ?
But what about the fact that when BeginInvoke
run and returned immediatly , someone else has actually do the dirty job ( and a code must be run under a thread which is under process.) so there must be somewhere a creation of thread (which run after beginXXX call)
What am I missing?