Sha256: b56f9496e661a2ee51049a6b2bf00e0ecfccd92c4f163f78c29593ba0a38835d

Contents?: true

Size: 916 Bytes

Versions: 151

Compression:

Stored size: 916 Bytes

Contents

if Concurrent.on_jruby?

  require 'concurrent/executor/java_executor_service'
  require 'concurrent/executor/serial_executor_service'

  module Concurrent

    # @!macro single_thread_executor
    # @!macro abstract_executor_service_public_api
    # @!visibility private
    class JavaSingleThreadExecutor < JavaExecutorService
      include SerialExecutorService

      # @!macro single_thread_executor_method_initialize
      def initialize(opts = {})
        super(opts)
      end

      private

      def ns_initialize(opts)
        @executor = java.util.concurrent.Executors.newSingleThreadExecutor(
            DaemonThreadFactory.new(ns_auto_terminate?)
        )
        @fallback_policy = opts.fetch(:fallback_policy, :discard)
        raise ArgumentError.new("#{@fallback_policy} is not a valid fallback policy") unless FALLBACK_POLICY_CLASSES.keys.include?(@fallback_policy)
      end
    end
  end
end

Version data entries

151 entries across 146 versions & 33 rubygems

Version Path
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-1.1.9 lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-1.1.8 lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-1.1.7 lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb