Sha256: 7489d6eb0ef560333ed0493e01a63c46255fe1787d9b67dca28318a8aa7d9c84
Contents?: true
Size: 536 Bytes
Versions: 23
Compression:
Stored size: 536 Bytes
Contents
# Copyright (c) 2016 SolarWinds, LLC. # All rights reserved. module AppOpticsAPM ## # Provides thread local storage for AppOpticsAPM. # # Example usage: # module AppOpticsAPMBase # extend AppOpticsAPM::ThreadLocal # thread_local :layer_op # end module ThreadLocal def thread_local(name) key = "__#{self}_#{name}__".intern define_method(name) do Thread.current[key] end define_method(name.to_s + '=') do |value| Thread.current[key] = value end end end end
Version data entries
23 entries across 23 versions & 3 rubygems