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
concurrent-ruby-1.3.5 lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-1.3.4 lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-1.3.3 lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-1.3.2 lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.1/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-1.3.1 lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-1.3.1.pre lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-1.2.3 lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb