From 6f36fedaa4788cfa956764d5b7e63fc67b444400 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 27 Sep 2000 09:11:13 +0000 Subject: matz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/philos.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sample') diff --git a/sample/philos.rb b/sample/philos.rb index 3ccb052532..119e7c36b9 100644 --- a/sample/philos.rb +++ b/sample/philos.rb @@ -46,8 +46,8 @@ def philosopher(n) end end -for i in 0..N-1 - Thread.start{philosopher(i)} +for n in 0..N-1 + Thread.start(n){|i| philosopher(i)} sleep 0.1 end -- cgit v1.2.3