Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Sources/NIOCore/GlobalSingletons.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ extension NIOSingletons {
/// The thread count is ``System/coreCount`` unless the environment variable `NIO_SINGLETON_GROUP_LOOP_COUNT`
/// is set or this value was set manually by the user.
///
/// Please note that setting this value is a privileged operation which should be performed very early on in the program's lifecycle
/// by the main function, or ideally not at all.
/// Furthermore, setting the value will only have an effect if the global singleton ``EventLoopGroup`` has not already
/// been used.
///
/// - Warning: This value can only be set _once_, attempts to set it again will crash the program.
/// - Note: This value must be set _before_ any singletons are used and must only be set once.
public static var groupLoopCountSuggestion: Int {
set {
Expand All @@ -67,6 +73,12 @@ extension NIOSingletons {
/// The thread count is ``System/coreCount`` unless the environment variable
/// `NIO_SINGLETON_BLOCKING_POOL_THREAD_COUNT` is set or this value was set manually by the user.
///
/// Please note that setting this value is a privileged operation which should be performed very early on in the program's lifecycle
/// by the main function, or ideally not at all.
/// Furthermore, setting the value will only have an effect if the global singleton thread pool has not already
/// been used.
///
/// - Warning: This value can only be set _once_, attempts to set it again will crash the program.
/// - Note: This value must be set _before_ any singletons are used and must only be set once.
public static var blockingPoolThreadCountSuggestion: Int {
set {
Expand All @@ -85,6 +97,10 @@ extension NIOSingletons {
///
/// This value cannot be changed using an environment variable.
///
/// Please note that setting this value is a privileged operation which should be performed very early on in the program's lifecycle
/// by the main function, or ideally not at all.
///
/// - Warning: This value can only be set _once_, attempts to set it again will crash the program.
/// - Note: This value must be set _before_ any singletons are used and must only be set once.
public static var singletonsEnabledSuggestion: Bool {
get {
Expand Down
Loading