public class NonStandardPoolsConfigurator
extends Object
The class purpose is to limit the number of threads in some non-standard for TeamCity but commonly used pools, like Java built-in fork-join pool, or Kotlin default coroutines pool.
This is required because quite often plugin writers don't pay enough attention to a number of threads created by their plugins, or by the libraries they're using.
Usually all these libraries allow customization of executors which are being used. If this customization is not done properly, then the common pools with only one thread will be used.
This prevents high memory usage and allows for a better control over resources which are being used by the system.
This check is disabled in production because it can cause issues like TW-73791, but is enabled in development mode
hoping that it will give us a chance to catch the problem with non-configured pools earlier.