Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lightweight Thread Pool Libraries in .NET

I'm looking for a thread pool library in .NET

  • I should able to push about 100.000 tasks, therefore should provide support for "blocking" . (obviously I can't push so many tasks at once, so should support some blocking while adding new tasks, and should block the thread until a new slot is available)
  • Not overly complicated
  • Not so expensive (memory - CPU wise)
  • Free / Open Source (Commercial Friendly License)

I've already got my own solution which supports all of these, but I'm not quite sure if it's the best implementation or not. So I want to look into other libraries.

This will be mainly used for HTTP Requests, so less CPU more response wait. That means 100 concurrent thread is acceptable.

like image 649
dr. evil Avatar asked Feb 17 '09 23:02

dr. evil


2 Answers

The best i've seen recently is Jeffery Richter's PowerThreading library. You might also want to check out this Channel 9 video

The nice thing about the PowerThreading library is that it makes efficient use of the the ThreadPool by allowing a single thread to be shared across many requests.

like image 170
Costa Rica Dev Avatar answered Oct 17 '22 14:10

Costa Rica Dev


Why not just use the .NET ThreadPool?

like image 39
Steven Evers Avatar answered Oct 17 '22 14:10

Steven Evers