From: Vikhyat Korrapati Date: 2009-06-09T20:23:57+09:00 Subject: Re: simple threading On Tue, Jun 9, 2009 at 4:36 PM, Christoph Jasinski wrote: > Hi all, > I wanted to write a program that request stock quotes say every second. So I > started to write a thread like this: > >  require 'rubygems' >  require 'yahoofinance' > >  thread=Thread.new do >    YahooFinance::get_historical_quotes_days( 'goog', 10 ) do |row| >      puts "YHOO,#{row.join(',')}" >    end >  end > > When I run this I don't get any results. Which is really weird. Got all the > gems and so on. > But when I do the same code run in IRB it works! without any surprises. I > don't get it. Really. > > Thanks for any help. > > Chris > Not sure, but adding 'thread.join' to the end might help. -- Vikhyat Korrapati http://aetus.net/