[#9445] thread.rb — m_seki@...

18 messages 2000/03/16
[#9446] Re: thread.rb — matz@... (Yukihiro Matsumoto) 2000/03/17

[#9460] Re: thread.rb — m_seki@... 2000/03/21

[#9462] Re: thread.rb — matz@... (Yukihiro Matsumoto) 2000/03/21

まつもと ゆきひろです

[#11281] Re: thread.rb — Masatoshi SEKI <m_seki@...> 2000/10/22

[#9498] timeout しない timeout — ARIMA Yasuhiro <fit0298@...>

有馬です。

20 messages 2000/03/26
[#9506] Re: timeout しない timeout — matz@... (Yukihiro Matsumoto) 2000/03/27

まつもと ゆきひろです

[#9509] Re: timeout しない timeout — gotoken@... (GOTO Kentaro) 2000/03/27

In message "[ruby-dev:9506] Re: timeout しない timeout"

[ruby-dev:9525] Re: timeout しない timeout

From: gotoken@... (GOTO Kentaro)
Date: 2000-03-29 05:14:03 UTC
List: ruby-dev #9525
ごとけんです

In message "[ruby-dev:9524] Re: timeout しない timeout"
    on 00/03/29, ARIMA Yasuhiro <fit0298@fitec.co.jp> writes:

>nil や false の指定で timeout しないで動くようにするための
>ruby-1.4.4 の lib/timeout.rb に対する patch です。
>こんな感じでしょうか?> gotoken さん

>--- timeout.rb.orig     Tue Mar 21 12:24:54 2000
>+++ timeout.rb  Wed Mar 29 13:08:59 2000
>@@ -26,6 +26,10 @@
> end
>
> def timeout(sec)
>+  if not sec
>+    yield sec
>+    return true
>+  end
>   begin
>     x = Thread.current
>     y = Thread.start {

sec を yield に渡す必要は感じませんです。

  return yield unless sec

くらいでいいような気もします。

-- gotoken

In This Thread