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