Files
SabreTools/SabreTools.Core/Globals.cs
Matt Nadareski 728b5d6b27 Perform mass cleanup
This is cleanup based on both new .NET functionality (in 6 and 7) as well as a ton of simplifications and things that were missed that were caught due to the cleanup.
2023-04-19 16:39:58 -04:00

29 lines
690 B
C#

using System;
using System.Threading.Tasks;
namespace SabreTools.Core
{
/// <summary>
/// Globally-accessible objects for the library
/// </summary>
public class Globals
{
#region Public accessors
/// <summary>
/// Maximum threads to use during parallel operations
/// </summary>
public static int MaxThreads { get; set; } = Environment.ProcessorCount;
/// <summary>
/// ParallelOptions object for use in parallel operations
/// </summary>
public static ParallelOptions ParallelOptions => new()
{
MaxDegreeOfParallelism = MaxThreads
};
#endregion
}
}