using System; using System.Threading.Tasks; 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; /// /// ParallelOptions object for use in parallel operations /// public static ParallelOptions ParallelOptions => new ParallelOptions() { MaxDegreeOfParallelism = MaxThreads }; #endregion } }