Thread and ThreadPool in .Net

by Christof 25. November 2009 22:52

If you deal with multithreaded programming in .net , you have the choice between ThreadPool and Thread. But what exactly is the difference between them?

ThreadPool

Server Applications (like the Windows Home Server) often use ThreadPools.
The Threadpool is suitable for short running work items and has a Thread limitation of 25 Threads per Application.
There is only one pool per process. You can't create a new one and you can't cancel the work items in the ThreadPool.

Threads

A Thread is the entity within a process that can be scheduled for execution. In comparison with ThreadPools, there is no managing of the remaining divided CPU time. You can start as many Threads as you like. A Thread has many functions/methods to start/stop and manage the Threads.

If you need a lot of Threads use a ThreadPool, otherwise you can take the easy way with a simple Thread.

Tags: ,

.net

Comments

3/20/2010 3:55:42 PM #

trackback

What's new in version 3.2 Part II

What's new in version 3.2 Part II

The Pixel Valley Blog

Comments are closed

Powered by BlogEngine.NET 1.6.1.0
Theme by Andy Brosius

New Filehoster

What is your favorite Filehoster for Release 3.3.2




Show Results

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar