Thread.new do f = "#{d}/README" read(file) end t2 = Thread.new do f = "#{d}/.vimrc" read(file) end puts t1.value puts t2.value __SCRIPT__ t2 Name Value d "/Users" def read(file) File.read(file) end d = "/Users" t1 = Thread.new do f = "#{d}/README" read(file) end t2 = Thread.new do f = "#{d}/.vimrc" read(file) end puts t1.value puts t2.value __SCRIPT__ t1 Name Value d "/Users" __SCRIPT__ def read(file) File.read(file) end d = "/Users" t1 = Thread.new do f = "#{d}/README" read(file) end t2 = Thread.new do f = "#{d}/.vimrc" read(file) end puts t1.value puts t2.value main Name Value d "/Users" active thread inactive threads