Class: Contrast::Agent::Thread
- Includes:
- Components::Scope::InstanceMethods
- Defined in:
- lib/contrast/agent/thread/thread.rb
Overview
Threads used by Contrast. Any long running thread should be created and managed by our ThreadWatcher class.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Thread
constructor
Make our internal code run in Contrast scope.
Methods included from Components::Scope::InstanceMethods
#contrast_enter_method_scopes!, #contrast_exit_method_scopes!, #with_app_scope, #with_contrast_scope, #with_deserialization_scope, #with_split_scope
Methods inherited from Thread
Constructor Details
#initialize(*args) ⇒ Thread
Make our internal code run in Contrast scope.
13 14 15 16 17 18 19 20 21 |
# File 'lib/contrast/agent/thread/thread.rb', line 13 def initialize *args wrapped_block = proc do |block_args| with_contrast_scope do yield(*block_args) end end super(*args, &wrapped_block) end |