Creating a Thread is expensive as it requires a few hundred milliseconds to create a new one. Additionally each thread requires atleast around 1MB of data. So instead of creating and destroying a thread each time we could just create a collection of preinstantiated threads and use them instead. Whenever we require a thread we ask thread pool for a thread which we can use and when we are done with it instead of destroying it we can send it back to the collection for recycling. This way we avoid the cost it incurs for creating and destroying threads. This collection of preinstantiated thread is called a Thread Pool.
Quick Notes for easy understanding. Chapters are on C#.Net,Linq,OOPS,Design Patterns,UML,Tools for development, Databases and many others. - Sid
Monday, May 16, 2016
Subscribe to:
Post Comments (Atom)
Code Formater
Paste Here Your Source Code | ||||||||||||||
Source Code Formatting Options | ||||||||||||||
|
||||||||||||||
Copy Formatted Source Code | ||||||||||||||
Preview Of Formatted Code |
No comments:
Post a Comment