From: Brian Candler Date: 2008-12-04T18:02:47+09:00 Subject: Re: New to ruby, using threads Brian Candler wrote: >> I cant get the "Starting new job" message appears in regular intervals >> of 3 seconds. What I'm missing? > > It works just fine for me (ruby-1.8.6p114, ubuntu hardy). Of course, this assumes that what you've written is what you want: - Start a single thread - Within this thread: - call do_something *and wait for it to finish* - sleep 3 seconds - loop around again Clearly the total time taken for each iteration of this loop is the time taken in do_something, plus 3 seconds, plus a small amount of overhead. -- Posted via http://www.ruby-forum.com/.