Class: Rage::Configuration::BlockingOperationPool
- Inherits:
-
Object
- Object
- Rage::Configuration::BlockingOperationPool
- Defined in:
- lib/rage/configuration.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Boolean
Enable a background thread pool for offloading native calls that can be executed outside the GVL, freeing the main server thread to continue processing other requests.
-
#size ⇒ Integer
Specify the number of threads in the pool.
Instance Attribute Details
#enabled ⇒ Boolean
Enable a background thread pool for offloading native calls that can be executed outside the GVL, freeing
the main server thread to continue processing other requests. This acts as a preemption mechanism: native calls
won't stall requests, as the OS will context-switch between the server thread and the worker threads.
Defaults to false.
1109 1110 1111 |
# File 'lib/rage/configuration.rb', line 1109 def enabled @enabled end |
#size ⇒ Integer
Specify the number of threads in the pool. Defaults to 1. A single thread is sufficient in most cases
because the pool's goal is context switching, not parallelization.
1109 |
# File 'lib/rage/configuration.rb', line 1109 attr_accessor :enabled, :size |