Module: Datadog::Contrib::ConcurrentRuby::FuturePatch
- Defined in:
- lib/ddtrace/contrib/concurrent_ruby/future_patch.rb
Overview
This patches the Future - to wrap executor service using ContextCompositeExecutorService
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ddtrace/contrib/concurrent_ruby/future_patch.rb', line 9 def self.included(base) base.class_eval do alias_method :ns_initialize_without_datadog, :ns_initialize remove_method(:ns_initialize) def ns_initialize(value, opts) ns_initialize_without_datadog(value, opts) @executor = ContextCompositeExecutorService.new(@executor) end end end |