yarv-dev:953
From: sheepman <sheepman sheepman.sakura.ne.jp>
Date: Tue, 21 Feb 2006 20:22:30 +0900
Subject: [yarv-dev:953] open> Thread#wakeup in at_exit
こんばんは、sheepman です。
次のように、at_exit のブロックの中で
スレッドを生成して stop と wakeup を使うと
固まってしまいます。
$ cat t.rb
at_exit do
main = nil
th = Thread.new do
Thread.stop
main.wakeup
end
Thread.pass until th.stop?
main = Thread.current
th.wakeup
Thread.stop
end
$ ./miniruby -v t.rb
ruby 1.9.0 (2006-02-14) [i686-linux]
YARVCore 0.3.3 (rev: 455) [opts: ]
(ここで固まる、Ctrl-C を押すと)
t.rb:11:in `stop': Interrupt
from t.rb:11:in `block in <main>'
--
sheepman / TAMURA Takashi
sheepman sheepman.sakura.ne.jp http://sheepman.parfait.ne.jp/
--
ML: yarv-dev quickml.atdot.net
使い方: http://www.atdot.net/~ko1/quickml
-> 953 2006-02-21 20:22 [sheepman sheepman.sa] open> Thread#wakeup in at_exit 954 2006-02-21 20:53 ┗[ko1 atdot.net ] fixed> Re: open> Thread#wakeup in at_exit 959 2006-02-21 23:57 ┗[sheepman sheepman.sa] close> Thread#wakeup in at_exit