Parent

Methods

Class/Module Index [+]

Quicksearch

Thread

Extensions for Thread

Public Class Methods

into(*args) click to toggle source

Copy all thread variables into the new thread

# File lib/ramaze/snippets/thread/into.rb, line 7
def self.into *args
  Thread.new(Thread.current, *args) do |thread, *args|
    thread.keys.each do |k|
      Thread.current[k] = thread[k] unless k.to_s =~ /^__/
    end

    yield(*args)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.