Module: RobotLab

Defined in:
lib/robot_lab/ractor.rb,
lib/robot_lab/ractor_job.rb,
lib/robot_lab/ractor/version.rb,
lib/robot_lab/ractor_boundary.rb,
lib/robot_lab/ractor_worker_pool.rb,
lib/robot_lab/ractor_memory_proxy.rb,
lib/robot_lab/ractor_network_scheduler.rb

Overview

Extend the RobotLab module with Ractor pool lifecycle methods. Once robot_lab removes its own copies and adds robot_lab-ractor as a dependency, this becomes the single source of truth for ractor_pool.

Defined Under Namespace

Modules: RactorBoundary, RactorPool Classes: RactorJob, RactorJobError, RactorMemoryProxy, RactorNetworkScheduler, RactorWorkerPool, RobotSpec

Class Method Summary collapse

Class Method Details

.ractor_poolObject



24
25
26
27
28
29
30
# File 'lib/robot_lab/ractor.rb', line 24

def ractor_pool
  @ractor_pool ||= begin
    size = respond_to?(:config) && config.respond_to?(:ractor_pool_size) \
      ? (config.ractor_pool_size || :auto) : :auto
    RactorWorkerPool.new(size: size)
  end
end

.shutdown_ractor_poolObject



32
33
34
35
# File 'lib/robot_lab/ractor.rb', line 32

def shutdown_ractor_pool
  @ractor_pool&.shutdown
  @ractor_pool = nil
end