Sha256: 1c969a1472519f178de82b589cb37fea304f65860c598daf9ad92ae91360f980

Contents?: true

Size: 320 Bytes

Versions: 20

Compression:

Stored size: 320 Bytes

Contents

# frozen_string_literal: true

require 'fiber'

module Bolt
  class Yarn
    attr_reader :fiber, :value, :index

    def initialize(fiber, index)
      @fiber = fiber
      @index = index
      @value = nil
    end

    def alive?
      fiber.alive?
    end

    def resume
      @value = fiber.resume
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
bolt-3.8.1 lib/bolt/yarn.rb
bolt-3.8.0 lib/bolt/yarn.rb
bolt-3.7.1 lib/bolt/yarn.rb
bolt-3.7.0 lib/bolt/yarn.rb
bolt-3.6.1 lib/bolt/yarn.rb
bolt-3.6.0 lib/bolt/yarn.rb
bolt-3.5.0 lib/bolt/yarn.rb
bolt-3.4.0 lib/bolt/yarn.rb
bolt-3.3.0 lib/bolt/yarn.rb
bolt-3.1.0 lib/bolt/yarn.rb
bolt-3.0.1 lib/bolt/yarn.rb
bolt-3.0.0 lib/bolt/yarn.rb
bolt-2.44.0 lib/bolt/yarn.rb
bolt-2.42.0 lib/bolt/yarn.rb
bolt-2.40.2 lib/bolt/yarn.rb
bolt-2.40.1 lib/bolt/yarn.rb
bolt-2.38.0 lib/bolt/yarn.rb
bolt-2.37.0 lib/bolt/yarn.rb
bolt-2.36.0 lib/bolt/yarn.rb
bolt-2.35.0 lib/bolt/yarn.rb