diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-02 13:48:21 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-02 13:48:21 -0500 |
| commit | f3159f3feff6a0ef11edb50cfc456f8c43d26d79 (patch) | |
| tree | 95811078e4cfc923be336e15ca1fa9afe9352449 /MediaBrowser.Server.Startup.Common | |
| parent | 0d8636d859cef5d0be4a723402926f05499210d7 (diff) | |
update ProcessManager
Diffstat (limited to 'MediaBrowser.Server.Startup.Common')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/Diagnostics/ProcessManager.cs | 23 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Startup.Common/Diagnostics/ProcessManager.cs b/MediaBrowser.Server.Startup.Common/Diagnostics/ProcessManager.cs new file mode 100644 index 0000000000..d01756d0e2 --- /dev/null +++ b/MediaBrowser.Server.Startup.Common/Diagnostics/ProcessManager.cs @@ -0,0 +1,23 @@ +using MediaBrowser.Controller.Diagnostics; +using System.Diagnostics; + +namespace MediaBrowser.Server.Mono.Diagnostics +{ + public class ProcessManager : IProcessManager + { + public void SuspendProcess(Process process) + { + process.PriorityClass = ProcessPriorityClass.Idle; + } + + public void ResumeProcess(Process process) + { + process.PriorityClass = ProcessPriorityClass.Normal; + } + + public bool SupportsSuspension + { + get { return true; } + } + } +} diff --git a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj index 38e07fde49..625b29d369 100644 --- a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj +++ b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj @@ -56,6 +56,7 @@ <Compile Include="ApplicationHost.cs" /> <Compile Include="ApplicationPathHelper.cs" /> <Compile Include="Browser\BrowserLauncher.cs" /> + <Compile Include="Diagnostics\ProcessManager.cs" /> <Compile Include="EntryPoints\KeepServerAwake.cs" /> <Compile Include="EntryPoints\StartupWizard.cs" /> <Compile Include="FFMpeg\FFMpegDownloader.cs" /> |
