Sha256: cf116a18f95d962115cd92448c73aaf68d22c2557608105eae4e923760bebbf9

Contents?: true

Size: 730 Bytes

Versions: 13

Compression:

Stored size: 730 Bytes

Contents

# frozen_string_literal: true

require 'opal/os' unless RUBY_ENGINE == 'opal'

module Opal
  class BuilderScheduler
    def initialize(builder)
      @builder = builder
    end

    attr_accessor :builder
  end

  singleton_class.attr_accessor :builder_scheduler

  if RUBY_ENGINE != 'opal'
    # Windows has a faulty `fork`.
    if OS.windows? || ENV['OPAL_PREFORK_DISABLE']
      require 'opal/builder_scheduler/sequential'
      Opal.builder_scheduler = BuilderScheduler::Sequential
    else
      require 'opal/builder_scheduler/prefork'
      Opal.builder_scheduler = BuilderScheduler::Prefork
    end
  else
    require 'opal/builder_scheduler/sequential'
    Opal.builder_scheduler = BuilderScheduler::Sequential
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 lib/opal/builder_scheduler.rb
opal-1.8.2 lib/opal/builder_scheduler.rb
opal-1.8.1 lib/opal/builder_scheduler.rb
opal-1.8.0 lib/opal/builder_scheduler.rb
opal-1.8.0.beta1 lib/opal/builder_scheduler.rb
opal-1.7.4 lib/opal/builder_scheduler.rb
opal-1.8.0.alpha1 lib/opal/builder_scheduler.rb
opal-1.7.3 lib/opal/builder_scheduler.rb
opal-1.7.2 lib/opal/builder_scheduler.rb
opal-1.7.1 lib/opal/builder_scheduler.rb
opal-1.7.0 lib/opal/builder_scheduler.rb
opal-1.7.0.rc1 lib/opal/builder_scheduler.rb
opal-1.6.1 lib/opal/builder_scheduler.rb