* lib/generator.rb: (Generator#initialize) fixed dead lock. this occured

when end? was called before @loop_thread was stopped. [ruby-core:7029]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2005-12-30 03:24:18 +00:00
parent 2b1319b03a
commit 5f82802aec
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Fri Dec 30 12:20:57 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* lib/generator.rb: (Generator#initialize) fixed dead lock. this occured
when end? was called before @loop_thread was stopped. [ruby-core:7029]
Fri Dec 30 01:04:52 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* lib/generator.rb: should work with another thread. (more robust code)

View File

@ -81,6 +81,7 @@ class Generator
@main_thread.wakeup
end
end
Thread.pass # ensure @loop_thread to be stopped
self
end