[#41134] [Bug:trunk] ext/tk on cygwin — Nobuyoshi Nakada <nobu@...>
なかだです。
[#41138] [Bug #3243] Can't build Ruby after r26506 — Yuki Sonoda <redmine@...>
Bug #3243: Can't build Ruby after r26506
[#41140] [Bug:trunk] the behavior of Tempfile#size was changed — Yusuke ENDOH <mame@...>
なかださん
Hi,
[#41173] [Feature #3251] allow to unlock mutex locked by another thread — Yusuke Endoh <redmine@...>
Feature #3251: allow to unlock mutex locked by another thread
[#41192] Re: [ruby-cvs:34848] Ruby:r27635 (trunk): * cont.c: apply FIBER_USE_NATIVE patch. This patch improve — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
まつもと ゆきひろです
こんにちは、なかむら(う)です。
[#41212] 実装凍結解除とリリース協力のお願い — Yugui <yugui@...>
Yuguiです。
[#41219] [ruby_1_9_2] コンパイルエラー — Takahiro Kambe <taca@...>
ruby_1_9_2ブランチのコンパイルでエラーが起きます。
[#41223] 正規表現オブジェクト中のキャプチャの数 — "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp>
きしもとです
[#41225] io/console IO#raw error when io is closed in the block — Tanaka Akira <akr@...>
io/console を使ってみたのですが、ちょっとうまく使えません。
[#41247] Regexpの仕様について — Masaya TARUI <tarui@...>
樽家です。
[#41259] Re: [ruby-cvs:34935] Ruby:r27723 (trunk): * ext/psych/parser.c (parse): Return strings encoded as — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
[#41278] [BUG:1.9] BINARY should not be ASCII-compatible — Yugui <yugui@...>
WXVndWkbJEIkRyQ5ISMbKEIKCgo+IBskQiRHISIkKiQqJGAkTSQzJDMkXiRHJE41RE9AJEclKyVQ
普段、あまりM17Nの件に反応しない卜部ですが、
2010/5/11 Urabe Shyouhei <shyouhei@ruby-lang.org>:
[#41286] ruby_1_9_2 on NetBSD 5.1_RC1(+) — Takahiro Kambe <taca@...>
再び、こんばんは。
[#41316] [Bug #3295] make test aborted — Kazuhiro NISHIYAMA <redmine@...>
Bug #3295: make test aborted
チケット #3295 が更新されました。 (by Yusuke Endoh)
[#41329] NoMethodErrorなどのmessage — Masatoshi SEKI <m_seki@...>
咳といいます。
まつもと ゆきひろです
[#41334] [Bug #3307] ext/tk がheader fileの有無を誤判定する — Masaya Tarui <redmine@...>
Bug #3307: ext/tk がheader fileの有無を誤判定する
[#41348] [Bug #3316] Kernel#caller returns nil as well — Nobuhiro IMAI <redmine@...>
Bug #3316: Kernel#caller returns nil as well
遠藤です。
[#41350] [Bug #3318] net/imap/test_imap.rb reports an error on Windows — Usaku NAKAMURA <redmine@...>
Bug #3318: net/imap/test_imap.rb reports an error on Windows
[#41353] [Bug #3037] testrb の動作が1.8.7 の testrb と違いすぎる — Yusuke Endoh <redmine@...>
チケット #3037 が更新されました。 (by Yusuke Endoh)
2010年5月19日21:04 Yusuke Endoh <redmine@ruby-lang.org>:
[#41377] [Bug #3326] ruby_1_8がAIXでコンパイルできません。 — Yutaka Kanemoto <redmine@...>
Bug #3326: ruby_1_8がAIXでコンパイルできません。
[#41382] [Feature #3328] Kernel#p outputs as default_internal encoding, and so on — Masaya Tarui <redmine@...>
Feature #3328: Kernel#p outputs as default_internal encoding, and so on
[#41407] [Bug #3339] win32ole test failure — Usaku NAKAMURA <redmine@...>
Bug #3339: win32ole test failure
助田です。
こんにちは、なかむら(う)です。
助田です。
こんにちは、なかむら(う)です。
志村と申します
[#41423] [Bug #3345] webrick test failure on Windows(?) — Usaku NAKAMURA <redmine@...>
Bug #3345: webrick test failure on Windows(?)
[#41430] [bug:trunk] rubyspec: Kernel.spawn redirects both STDERR and STDOUT to the given name ERROR — Yusuke ENDOH <mame@...>
遠藤です。
[#41452] [Bug #3360] rdoc fails when including BOM — white leaf <redmine@...>
Bug #3360: rdoc fails when including BOM
チケット #3360 が更新されました。 (by Nobuyoshi Nakada)
[#41481] [Bug #3370] test failure of drb — Usaku NAKAMURA <redmine@...>
Bug #3370: test failure of drb
[ruby-dev:41155] Re: MonitorMixin::ConditionVariable#wait timeout
前田さん、akr さん
遠藤です。
2010年2月5日14:48 Shugo Maeda <shugo@ruby-lang.org>:
>> Ruby 1.8 のころは timeout 引数が動作していたようなのですが、
>> Ruby 1.9 で timeout 引数がまた動作するようになる予定はあるのでしょうか。
>> メッセージからするとそのうち実装されるような感じがするのですが。
>
> ::ConditionVariable#waitがtimeoutに対応しているようなので、引数を
> そのまま渡すようにしたいと思います。
> ただ、戻り値については1.8と非互換になりますが、timeoutで返って来たのか
> 判定する術がないので、常にtrueを返すことにしたいと思います。
> # ついでにドキュメントを追加します。
[Bug #2629] で ::ConditionVariable#wait の API 設計に race condition が
あることがわかりました。
秒数ではなく絶対時刻で指定すべき (少なくとも、絶対時刻は受け付けるべき)
ようです。また、timeout で帰ってきたかどうかを返り値として返した方が
よいという指摘もあります。
絶対時刻を受け付けるためには thread.c を結構いろいろ変えないといけない
ので、すでに feature freeze 後ということもあり、保守的ですが 1.9.2 では
revert しようと思いますが、いかがでしょうか。
>> とりあえず wait にタイムアウトを入れて、ハングしないで test-all
>> が最後までいくようにしようか、と思ったのですが、
>> MonitorMixin::ConditionVariable#wait の timeout 引数を指定すると
>> timeout is not implemented yet というメッセージで
>> NotImplementedError になってしまいます。
こっちの問題に関しては、タイミングに依存するので多少ださいですが、時間
指定の sleep を使えばもっと簡単になると思います。
test/ruby 以下にはこんなコードがたくさんあります。
ただ、このテストがテストしたいのが imap.idle のブロックからの途中脱出だ
としたら、break するだけでいいかも?
diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb
index 501298c..b1994b1 100644
--- a/test/net/imap/test_imap.rb
+++ b/test/net/imap/test_imap.rb
@@ -217,30 +217,18 @@ class IMAPTest < Test::Unit::TestCase
begin
imap = Net::IMAP.new("localhost", :port => port)
begin
- th = Thread.current
- m = Monitor.new
in_idle = false
- exception_raised = false
- c = m.new_cond
- Thread.start do
- m.synchronize do
- until in_idle
- c.wait(0.1)
- end
- end
- th.raise(Interrupt)
- exception_raised = true
+ th = Thread.start do
+ Thread.pass until in_idle
+ Thread.main.raise(Interrupt)
end
imap.idle do |res|
- m.synchronize do
- in_idle = true
- c.signal
- until exception_raised
- c.wait(0.1)
- end
- end
+ in_idle = true
+ sleep 1
end
rescue Interrupt
+ ensure
+ th.kill if th.alive?
end
assert_equal(2, requests.length)
assert_equal("RUBY0001 IDLE\r\n", requests[0])
--
Yusuke Endoh <mame@tsg.ne.jp>