Phy Prabab wrote:
> 
> Yes, there was a bug in my code, that being a typo of thread.id (should 
> be Thread.id), but the biggest thing, was the fact that I needed to do a 
> thread join.  So I added this:
> 
> threads.each {|eachThread| eachThread.join}
> 
> Now on to signaling!
> 

I think your code still isn't quite what you want.  Try

require 'thread'

threads = []
mutex = Mutex.new
STDOUT.sync = true

list = %w(aS, bS, cS, dS, eS, fS, gS, hS)

for space in list
  threads << Thread.new(space) {|numericalSpace|
    while true
      mutex.synchronize do
        puts "#{Thread.current.object_id}: #{numericalSpace}"
      end
      sleep 2.5
    end
  }
end

threads.each {|eachThread| eachThread.join}

-- 
Posted via http://www.ruby-forum.com/.