This project is read-only.

I am going to change the source control to git, until this happens the updated source code can be found at here

Project Description
Smart Thread Pool is a thread pool written in C#. It is far more advanced than the .NET built-in thread pool.
Here is a list of the thread pool features:

* The number of threads dynamically changes according to the workload on the threads in the pool.
* Work items can return a value.
* A work item can be cancelled.
* The caller thread's context is used when the work item is executed (limited).
* Usage of minimum number of Win32 event handles, so the handle count of the application won't explode.
* The caller can wait for multiple or all the work items to complete.
* Work item can have a PostExecute callback, which is called as soon the work item is completed.
* The state object, that accompanies the work item, can be disposed automatically.
* Work item exceptions are sent back to the caller.
* Work items have priority.
* Work items group.
* The caller can suspend the start of a thread pool and work items group.
* Threads have priority.
* Can run COM objects that have single threaded apartment.
* Support Action<T> and Func<T> delegates.
* Support for WindowsCE (limited)
* The MaxThreads and MinThreads can be changed at run time.
* Cancel behavior is imporved.

The full article can be found at Smart Thread Pool

Smart Thread Pool demo on Mono

Smart Thread Pool demo on Silverlight

Smart Thread Pool demo on WindowsCE

Smart Thread Pool demo

Work Items Group demo

Smart Thread Pool demo on Windows Phone (emulator)


Last edited Aug 23, 2012 at 11:07 AM by amibar, version 10