Package io.deephaven.util.thread
Class ThreadHelpers
java.lang.Object
io.deephaven.util.thread.ThreadHelpers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
getOrComputeThreadCountProperty
(String configKey, int defaultValue) Get the number of threads to use for a given configuration key, defaulting to the number of available processors if the configuration key is set to a non-positive value, or the configuration key is not set and the provided default is non-positive.
-
Constructor Details
-
ThreadHelpers
public ThreadHelpers()
-
-
Method Details
-
getOrComputeThreadCountProperty
Get the number of threads to use for a given configuration key, defaulting to the number of available processors if the configuration key is set to a non-positive value, or the configuration key is not set and the provided default is non-positive.- Parameters:
configKey
- The configuration key to look updefaultValue
- The default value to use if the configuration key is not set- Returns:
- The number of threads to use
-