class Dynflow::DelayedExecutors::Abstract
Attributes
core[R]
Public Class Methods
new(world, options = {})
click to toggle source
# File lib/dynflow/delayed_executors/abstract.rb, line 7 def initialize(world, options = {}) @world = world @options = options @started = false spawn end
Public Instance Methods
spawn()
click to toggle source
# File lib/dynflow/delayed_executors/abstract.rb, line 28 def spawn Concurrent::Promises.resolvable_future.tap do |initialized| @core = core_class.spawn name: 'delayed-executor', args: [@world, @options], initialized: initialized end end
start()
click to toggle source
# File lib/dynflow/delayed_executors/abstract.rb, line 18 def start @core.ask(:start).tap do @started = true end end
started?()
click to toggle source
# File lib/dynflow/delayed_executors/abstract.rb, line 14 def started? @started end
terminate()
click to toggle source
# File lib/dynflow/delayed_executors/abstract.rb, line 24 def terminate @core.ask(:terminate!) end
Private Instance Methods
core_class()
click to toggle source
# File lib/dynflow/delayed_executors/abstract.rb, line 38 def core_class raise NotImplementedError end