Reputation: 345
Feel free to ask for more context.
I have a requirement where a lot of tasks come and they can get in large number. So I want to throttle the queuing of tasks and want to control the concurrency also. Till now I have found that I can created a Custom TaskScheduler that limits the concurrency (I read here: http://msdn.microsoft.com/en-us/library/ee789351(v=vs.110).aspx) and also when tasks queued becomes more than a maximum limit I block the task scheduling in TaskFactory.StartNew method. Here are my questions:
Upvotes: 2
Views: 514
Reputation: 4797
Have you considered any of the specialized task schedulers from parallel extensions extras?
http://blogs.msdn.com/b/pfxteam/archive/2010/04/09/9990424.aspx
Upvotes: 1