Class: Concurrent::Configuration
- Inherits:
-
Object
- Object
- Concurrent::Configuration
- Defined in:
- lib/concurrent/configuration.rb
Overview
A gem-level configuration object.
Instance Method Summary collapse
-
#auto_terminate ⇒ Object
deprecated
Deprecated.
Use Concurrent.auto_terminate_global_executors? instead
-
#auto_terminate=(value) ⇒ Object
deprecated
Deprecated.
Use Concurrent.disable_executor_auto_termination! instead
-
#global_operation_pool ⇒ Object
deprecated
Deprecated.
Use Concurrent.global_fast_executor instead
-
#global_operation_pool=(executor) ⇒ Object
deprecated
Deprecated.
Replacing global thread pools is deprecated. Use the :executor constructor option instead.
-
#global_task_pool ⇒ Object
deprecated
Deprecated.
Use Concurrent.global_io_executor instead
-
#global_task_pool=(executor) ⇒ Object
deprecated
Deprecated.
Replacing global thread pools is deprecated. Use the :executor constructor option instead.
-
#global_timer_set ⇒ Object
deprecated
Deprecated.
Use Concurrent.global_timer_set instead
-
#initialize ⇒ Configuration
constructor
Create a new configuration object.
-
#logger ⇒ Object
deprecated
Deprecated.
Use Concurrent.global_logger instead
-
#logger=(value) ⇒ Object
deprecated
Deprecated.
Use Concurrent.global_logger instead
-
#new_operation_pool ⇒ Object
deprecated
Deprecated.
Use Concurrent.new_fast_executor instead
-
#new_task_pool ⇒ Object
deprecated
Deprecated.
Use Concurrent.new_io_executor instead
-
#no_logger ⇒ Object
deprecated
Deprecated.
Use Concurrent::NULL_LOGGER instead
Constructor Details
#initialize ⇒ Configuration
Create a new configuration object.
175 176 |
# File 'lib/concurrent/configuration.rb', line 175 def initialize end |
Instance Method Details
#auto_terminate ⇒ Object
Use Concurrent.auto_terminate_global_executors? instead
256 257 258 259 |
# File 'lib/concurrent/configuration.rb', line 256 def auto_terminate deprecated_method 'Concurrent.configuration.auto_terminate', 'Concurrent.auto_terminate_global_executors?' Concurrent.auto_terminate_global_executors? end |
#auto_terminate=(value) ⇒ Object
Use Concurrent.disable_executor_auto_termination! instead
250 251 252 253 |
# File 'lib/concurrent/configuration.rb', line 250 def auto_terminate=(value) deprecated_method 'Concurrent.configuration.auto_terminate=', 'Concurrent.disable_executor_auto_termination!' Concurrent.disable_executor_auto_termination! if !value end |
#global_operation_pool ⇒ Object
Use Concurrent.global_fast_executor instead
210 211 212 213 |
# File 'lib/concurrent/configuration.rb', line 210 def global_operation_pool deprecated_method 'Concurrent.configuration.global_operation_pool', 'Concurrent.global_fast_executor' Concurrent.global_fast_executor end |
#global_operation_pool=(executor) ⇒ Object
Replacing global thread pools is deprecated. Use the :executor constructor option instead.
231 232 233 234 235 |
# File 'lib/concurrent/configuration.rb', line 231 def global_operation_pool=(executor) deprecated 'Replacing global thread pools is deprecated. Use the :executor constructor option instead.' GLOBAL_FAST_EXECUTOR.reconfigure { executor } or raise ConfigurationError.new('global operation pool was already set') end |
#global_task_pool ⇒ Object
Use Concurrent.global_io_executor instead
204 205 206 207 |
# File 'lib/concurrent/configuration.rb', line 204 def global_task_pool deprecated_method 'Concurrent.configuration.global_task_pool', 'Concurrent.global_io_executor' Concurrent.global_io_executor end |
#global_task_pool=(executor) ⇒ Object
Replacing global thread pools is deprecated. Use the :executor constructor option instead.
223 224 225 226 227 |
# File 'lib/concurrent/configuration.rb', line 223 def global_task_pool=(executor) deprecated 'Replacing global thread pools is deprecated. Use the :executor constructor option instead.' GLOBAL_IO_EXECUTOR.reconfigure { executor } or raise ConfigurationError.new('global task pool was already set') end |
#global_timer_set ⇒ Object
Use Concurrent.global_timer_set instead
216 217 218 219 |
# File 'lib/concurrent/configuration.rb', line 216 def global_timer_set deprecated_method 'Concurrent.configuration.global_timer_set', 'Concurrent.global_timer_set' Concurrent.global_timer_set end |
#logger ⇒ Object
Use Concurrent.global_logger instead
a proc defining how to log messages, its interface has to be:
lambda { |level, progname, = nil, &block| _ }
189 190 191 192 |
# File 'lib/concurrent/configuration.rb', line 189 def logger deprecated_method 'Concurrent.configuration.logger', 'Concurrent.global_logger' Concurrent.global_logger.value end |
#logger=(value) ⇒ Object
Use Concurrent.global_logger instead
a proc defining how to log messages, its interface has to be:
lambda { |level, progname, = nil, &block| _ }
198 199 200 201 |
# File 'lib/concurrent/configuration.rb', line 198 def logger=(value) deprecated_method 'Concurrent.configuration.logger=', 'Concurrent.global_logger=' Concurrent.global_logger = value end |
#new_operation_pool ⇒ Object
Use Concurrent.new_fast_executor instead
244 245 246 247 |
# File 'lib/concurrent/configuration.rb', line 244 def new_operation_pool deprecated_method 'Concurrent.configuration.new_operation_pool', 'Concurrent.new_fast_executor' Concurrent.new_fast_executor end |
#new_task_pool ⇒ Object
Use Concurrent.new_io_executor instead
238 239 240 241 |
# File 'lib/concurrent/configuration.rb', line 238 def new_task_pool deprecated_method 'Concurrent.configuration.new_task_pool', 'Concurrent.new_io_executor' Concurrent.new_io_executor end |
#no_logger ⇒ Object
Use Concurrent::NULL_LOGGER instead
if assigned to #logger, it will log nothing.
180 181 182 183 |
# File 'lib/concurrent/configuration.rb', line 180 def no_logger deprecated_method 'Concurrent.configuration.no_logger', 'Concurrent::NULL_LOGGER' NULL_LOGGER end |