mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Force min 4 threads in pool
This commit is contained in:
parent
0080e6b685
commit
789e47dfff
@ -1,4 +1,6 @@
|
|||||||
|
using System;
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
|
using System.Threading;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Composition;
|
using NzbDrone.Common.Composition;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
@ -89,6 +91,9 @@ public void Start()
|
|||||||
//_cancelHandler = new CancelHandler();
|
//_cancelHandler = new CancelHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ThreadPool.GetMinThreads(out var minWorker, out var minIOC);
|
||||||
|
ThreadPool.SetMinThreads(Math.Max(4, minWorker), Math.Max(4, minIOC));
|
||||||
|
|
||||||
_runtimeInfo.IsExiting = false;
|
_runtimeInfo.IsExiting = false;
|
||||||
DbFactory.RegisterDatabase(_container);
|
DbFactory.RegisterDatabase(_container);
|
||||||
_hostController.StartServer();
|
_hostController.StartServer();
|
||||||
|
Loading…
Reference in New Issue
Block a user