G
Guest
This is quite an issue for me when doing debugging for async delegate call
(i.e., using BeginInvoke).
Note this is NOT Control.BeginInvoke, which runs on the thread creates the
control.
According to MSDN:
If the BeginInvoke method is called, the common language runtime (CLR) will
queue the request and return immediately to the caller. The target method
will be called on a thread from the thread pool.
SO it comes to Q1: is this thread pool the same one as
System.Threading.ThreadPool? What if I have used System.Threading.ThreadPool
to its full capacity and there is no more free thread available there? Will
the BeginInvoke be blocked there? If so, the design of async delegate has
problem.
Also, since thread and thread pool is already there in the framework, what
is the necessity of the existence of asycn delegate then? Or what is the
difference between them?
Thanks in advance. I have been puzzled by above questions for quite some time.
(i.e., using BeginInvoke).
Note this is NOT Control.BeginInvoke, which runs on the thread creates the
control.
According to MSDN:
If the BeginInvoke method is called, the common language runtime (CLR) will
queue the request and return immediately to the caller. The target method
will be called on a thread from the thread pool.
SO it comes to Q1: is this thread pool the same one as
System.Threading.ThreadPool? What if I have used System.Threading.ThreadPool
to its full capacity and there is no more free thread available there? Will
the BeginInvoke be blocked there? If so, the design of async delegate has
problem.
Also, since thread and thread pool is already there in the framework, what
is the necessity of the existence of asycn delegate then? Or what is the
difference between them?
Thanks in advance. I have been puzzled by above questions for quite some time.