Provides wrappers around some threading constructs used by the platform in order to facilitate logging of thread-local context provided by NodeLogger.
These functions are meant to be transparent wrappers of the target method call, but will inject items from +NodeLogger#context+ in the current thread to the +NodeLogger#context+ of the new thread.
This allows logging context entries to cross thread boundaries.
Delegates to the stdlib +Thread#new+ method.
# File lib/openshift-origin-node/utils/threads.rb, line 27 def self.new_thread(*args, &block) parent = Thread.current Thread.new(*args) do |*items| Thread.current[NodeLogger::CONTEXT_KEY] = parent[NodeLogger::CONTEXT_KEY] block.call(*items) end end
Generated with the Darkfish Rdoc Generator 2.