Monday, March 15, 2010

03/15: CLR Threading Pool

 

When CLR initializes, the thread pool has no thread and the task queue of the pool is empty. When this queue is not empty,threading pool will create / kill  thread dynamically based on the tasks inside of queue..

In my mind

Threading pool is like an optimized system thread component which can be used by developer. Developer don’t need to know much detail about this implementation. Developer can just use it to do thread management efficiently.

 

Two kinds of threads in this pool

  • Work threads are used when your application asks the thread pool to perform an asynchronous computer-bound operation (which can include initiating an I/O-bound operation).
  • I/O threads are used to notify your code when an asynchronous I/O-bound operation has completed. Specifically, this means that you are using the Asynchronous Programming Model (APM) to make I/O requests such as accessing a file, networked server, database, Web service, or other hardware device

0 Comments:

Post a Comment

<< Home