Class: Temporalio::Worker::Tuner::SlotSupplier::Fixed

Inherits:
Temporalio::Worker::Tuner::SlotSupplier show all
Defined in:
lib/temporalio/worker/tuner.rb

Overview

A fixed-size slot supplier that will never issue more than a fixed number of slots.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slots) ⇒ Fixed

Create fixed-size slot supplier.

Parameters:

  • slots (Integer)

    The maximum number of slots that can be issued.



18
19
20
# File 'lib/temporalio/worker/tuner.rb', line 18

def initialize(slots) # rubocop:disable Lint/MissingSuper
  @slots = slots
end

Instance Attribute Details

#slotsInteger (readonly)

Returns The maximum number of slots that can be issued.

Returns:

  • (Integer)

    The maximum number of slots that can be issued.



13
14
15
# File 'lib/temporalio/worker/tuner.rb', line 13

def slots
  @slots
end