2009/5/26 Nabs Kahn <nabusman / gmail.com>: > Thanks for the quick response, this is what I wrote, but it doesn't seem > to work, no errors, but it just finishes the program without doing > anything. Where did I go wrong? I am not sure what you expect: your program does not do anything with the url. Did you try printing it? > require 'thread' > > buffer = SizedQueue.new(10) > > producer = Thread.new do > ¨Âéìå®ïðåõòìó®ôøô¢©®åáãäï üõòì> ¨Âõææå¼¼ õò For better readability I suggest using buffer.enq. > ¨Âîä > end > > consumer = Thread.new do > ¨Âèéìå âõææåò®îõíß÷áéôéîç ¡½ Rather use buffer.deq which is a blocking call. Also, in your case, the consumer will stop working as soon as the queu has run empty *once*. You rather want a more reliable termination detection. Usually I put a special value into the queue (more precisely, as many special values as there are threads). In your case a symbol would work. > ¨Âòì âõææåò®ðïð > do screen scraping with url here > ¨Âîä > end > > consumer.join Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/