|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using System.Web;
|
|
|
using Nancy;
|
|
|
using Nancy.ErrorHandling;
|
|
|
+using System.Threading;
|
|
|
|
|
|
namespace NancyBenchmark
|
|
|
{
|
|
@@ -10,7 +11,9 @@ namespace NancyBenchmark
|
|
|
{
|
|
|
protected void Application_Start()
|
|
|
{
|
|
|
-
|
|
|
+ var threads = 40 * Environment.ProcessorCount;
|
|
|
+ ThreadPool.SetMaxThreads(threads, threads);
|
|
|
+ ThreadPool.SetMinThreads(threads, threads);
|
|
|
}
|
|
|
}
|
|
|
}
|