Concurrent::AbstractThreadLocalVar
@!visibility private @!macro internal_implementation_note
@!visibility private
# File lib/concurrent/atomic/thread_local_var.rb, line 125 def allocate_storage @storage = WeakKeyMap.new end
# File lib/concurrent/atomic/thread_local_var.rb, line 130 def get @storage[Thread.current] end
# File lib/concurrent/atomic/thread_local_var.rb, line 135 def set(value) key = Thread.current @storage[key] = value if block_given? begin yield ensure @storage.delete(key) end end end
[Validate]
Generated with the Darkfish Rdoc Generator 2.