tgstation-server
6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
src
Tgstation.Server.Host
Extensions
GeneralConfigurationExtensions.cs
Go to the documentation of this file.
1
using
System;
2
3
using
Tgstation.Server.Host.Configuration
;
4
5
namespace
Tgstation.Server.Host.Extensions
6
{
10
static
class
GeneralConfigurationExtensions
11
{
17
public
static
int
?
GetCopyDirectoryTaskThrottle
(
this
GeneralConfiguration
generalConfiguration)
18
{
19
ArgumentNullException.ThrowIfNull(generalConfiguration);
20
21
var tasksPerCore = generalConfiguration.
DeploymentDirectoryCopyTasksPerCore
;
22
if
(!tasksPerCore.HasValue)
23
return
null
;
24
25
var taskThrottle = (uint)Environment.ProcessorCount * tasksPerCore.Value;
26
return
(
int
)taskThrottle;
27
}
28
}
29
}
Tgstation.Server.Host.Configuration.GeneralConfiguration
General configuration options.
Definition
GeneralConfiguration.cs:23
Tgstation.Server.Host.Configuration.GeneralConfiguration.DeploymentDirectoryCopyTasksPerCore
uint? DeploymentDirectoryCopyTasksPerCore
A limit on the amount of tasks used for asynchronous I/O when copying directories during the deployme...
Definition
GeneralConfiguration.cs:138
Tgstation.Server.Host.Extensions.GeneralConfigurationExtensions
Extension methods for the GeneralConfiguration class.
Definition
GeneralConfigurationExtensions.cs:11
Tgstation.Server.Host.Extensions.GeneralConfigurationExtensions.GetCopyDirectoryTaskThrottle
static ? int GetCopyDirectoryTaskThrottle(this GeneralConfiguration generalConfiguration)
Gets the total number of tasks that may run simultaneously during an asynchronous directory copy oper...
Definition
GeneralConfigurationExtensions.cs:17
Tgstation.Server.Host.Configuration
Definition
ControlPanelConfiguration.cs:4
Tgstation.Server.Host.Extensions
Definition
ApplicationBuilderExtensions.cs:22
Generated by
1.9.8