# File lib/dynflow/delayed_executors/abstract.rb, line 7 def initialize(world, options = {}) @world = world @options = options @started = false spawn end
# File lib/dynflow/delayed_executors/abstract.rb, line 28 def spawn Concurrent.future.tap do |initialized| @core = core_class.spawn name: 'delayed-executor', args: [@world, @options], initialized: initialized end end
# File lib/dynflow/delayed_executors/abstract.rb, line 18 def start @core.ask(:start).tap do @started = true end end
# File lib/dynflow/delayed_executors/abstract.rb, line 14 def started? @started end
# File lib/dynflow/delayed_executors/abstract.rb, line 24 def terminate @core.ask(:terminate!) end
# File lib/dynflow/delayed_executors/abstract.rb, line 38 def core_class raise NotImplementedError end