From: Brian Candler Date: 2007-04-12T05:12:21+09:00 Subject: Re: Problem calling Net::HTTP.get_response in Thread.new On Thu, Apr 12, 2007 at 04:54:05AM +0900, Ming en Chia wrote: > i had a strange problem of unable to call Net::HTTP.get_response in > thread > example this work well > > Net::HTTP.get_response(URI.parse("http://www.google.com/")) > > however when i called inside a thread it does not work it does not work, > i was wondering why. > > Thread.new do > Net::HTTP.get_response(URI.parse("http://www.google.com/")) > end Is that your entire program? If so you will need t = Thread.new do # whatever end t.join Otherwise the main program will exit immediately, and terminate all other threads.