Class: RightSpeed::Worker::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/right_speed/worker/base.rb

Direct Known Subclasses

Accepter, Fair, RoundRobin

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, handler:) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
# File 'lib/right_speed/worker/base.rb', line 9

def initialize(id:, handler:)
  @id = id
  @handler = handler
  @ractor = nil
end

Instance Attribute Details

#ractorObject (readonly)

Returns the value of attribute ractor.



7
8
9
# File 'lib/right_speed/worker/base.rb', line 7

def ractor
  @ractor
end

Instance Method Details

#stopObject



15
16
17
# File 'lib/right_speed/worker/base.rb', line 15

def stop
  @ractor # TODO: terminate if possible
end