Class: Kreuzberg::Config::Concurrency
- Inherits:
-
Object
- Object
- Kreuzberg::Config::Concurrency
- Defined in:
- lib/kreuzberg/config.rb
Overview
Concurrency configuration for thread pool management
Instance Attribute Summary collapse
-
#max_threads ⇒ Object
readonly
Returns the value of attribute max_threads.
Instance Method Summary collapse
-
#initialize(max_threads: nil) ⇒ Concurrency
constructor
A new instance of Concurrency.
- #to_h ⇒ Object
Constructor Details
#initialize(max_threads: nil) ⇒ Concurrency
Returns a new instance of Concurrency.
931 932 933 |
# File 'lib/kreuzberg/config.rb', line 931 def initialize(max_threads: nil) @max_threads = max_threads&.to_i end |
Instance Attribute Details
#max_threads ⇒ Object (readonly)
Returns the value of attribute max_threads.
929 930 931 |
# File 'lib/kreuzberg/config.rb', line 929 def max_threads @max_threads end |
Instance Method Details
#to_h ⇒ Object
935 936 937 938 939 |
# File 'lib/kreuzberg/config.rb', line 935 def to_h h = {} h[:max_threads] = @max_threads unless @max_threads.nil? h end |