Sha256: 1a6bc0578d382c42c88df1893d8b64d88c50bec3facdeed6f2745499b057eefe

Contents?: true

Size: 638 Bytes

Versions: 26

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true

require_relative 'context_composite_executor_service'

module Datadog
  module Tracing
    module Contrib
      module ConcurrentRuby
        # This patches the Future - to wrap executor service using ContextCompositeExecutorService
        module PromisesFuturePatch
          def future_on(default_executor, *args, &task)
            unless default_executor.is_a?(ContextCompositeExecutorService)
              default_executor = ContextCompositeExecutorService.new(default_executor)
            end

            super(default_executor, *args, &task)
          end
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
datadog-2.9.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.8.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.7.1 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.7.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.6.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.5.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.4.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.3.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.2.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
ddtrace-1.23.3 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
ddtrace-1.23.2 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.1.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.0.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
ddtrace-1.23.1 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.0.0.beta2 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
ddtrace-1.22.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
datadog-2.0.0.beta1 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
ddtrace-1.21.1 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
ddtrace-1.21.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb
ddtrace-1.20.0 lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb