Sha256: dd97ec494e64a27ed22a05599c48774262de56296a716e7473a952fc1e57bbea

Contents?: true

Size: 694 Bytes

Versions: 15

Compression:

Stored size: 694 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

class FakeThread
  @@list = []

  def initialize(locals={}, &block)
    @locals = locals
    yield if block_given?
  end

  def self.current
    {}
  end

  def self.list
    @@list
  end

  def self.bucket_thread(thread, _)
    thread[:bucket]
  end

  def self.scrub_backtrace(thread, _)
    thread[:scrubbed_backtrace] || thread.backtrace
  end

  def alive?
    true
  end

  def key?(key)
    @locals.key?(key)
  end

  def [](key)
    @locals[key]
  end

  def backtrace
    @locals[:backtrace] || []
  end

  def join
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
newrelic_rpm-3.8.1.221 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.8.0.218 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.3.204 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.3.199 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.2.195 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.2.192 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.2.190.beta test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.1.188 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.1.182 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.1.180 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.0.177 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.7.0.174.beta test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.6.9.171 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.6.8.168 test/new_relic/agent/threading/fake_thread.rb
newrelic_rpm-3.6.8.164 test/new_relic/agent/threading/fake_thread.rb