るりまサーチ

最速Rubyリファレンスマニュアル検索!
26件ヒット [1-26件を表示] (0.036秒)

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer times
  5. integer digits

ライブラリ

クラス

キーワード

検索結果

Mutex#sleep(timeout = nil) -> Integer (18333.0)

与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。

...与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。

@param timeout スリープする秒数を指定します。省略するとスリープし続けます。

@return スリープしていた秒数を返します。

@raise ThreadError...
...グナルを受信した場合などに実行が再
開(spurious wakeup)される場合がある点に注意してください。

//emlist[例][ruby]{
m = Mutex.new
th = Thread.new do
m.lock
m.sleep(2)
end
th.status # => "run"
sleep
1
th.status # => "sleep"
sleep
1
th.status # => false
//}...

Thread::Mutex#sleep(timeout = nil) -> Integer (18333.0)

与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。

...与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。

@param timeout スリープする秒数を指定します。省略するとスリープし続けます。

@return スリープしていた秒数を返します。

@raise ThreadError...
...グナルを受信した場合などに実行が再
開(spurious wakeup)される場合がある点に注意してください。

//emlist[例][ruby]{
m = Mutex.new
th = Thread.new do
m.lock
m.sleep(2)
end
th.status # => "run"
sleep
1
th.status # => "sleep"
sleep
1
th.status # => false
//}...
...与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。

@param timeout スリープする秒数を指定します。省略するとスリープし続けます。

@return タイムアウトした時は nil を、それ以外はスリープし...

ruby 1.6 feature (72.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...from -:2
ruby 1.6.7 (2002-07-30) [i586-linux]

: 2002-06-03 sprintf()

"%d" で引数を整数にするときに、((<組み込み関数/Integer>)) と同じ規則を
使用するようになりました。

p sprintf("%d", nil)

=> -:1:in `sprintf': no implicit conversio...
...するとエラーになっていました。
((<ruby-dev:17155>))

open("|-","r+") {|f|
if f
f.dup.close_write
else
sleep
1
end
}

=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_write': closing non-duplex IO for writing (IOError)...
...したリゾルバは、timeout の制御が効きます(つまり、名前解
決中にThreadが切替え可能ということです)

require 'resolv'
p Resolv.new.getaddress("www.ruby-lang.org").to_s

=> /usr/local/lib/ruby/1.6/resolv.rb:160: warning: timeout (...) interpreted as me...

NEWS for Ruby 3.0.0 (48.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...eadable, IO#wait_writable, IO#read, IO#write and other related methods (e.g. IO#puts, IO#gets) may invoke the scheduler hook `#io_wait(io, events, timeout)` in a non-blocking execution context. 16786
* Kernel
* Kernel#clone when called with the `freeze: false` keyword will call `#initialize_cl...
...for `__LINE__` in the evaluated code. 4352
* Kernel#lambda now warns if called without a literal block. 15973
* Kernel.sleep invokes the scheduler hook `#kernel_sleep(...)` in a non-blocking execution context. 16786
* Module
* Module#include and Module#prepend now affect classes and mo...
...redirected to a closed pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modi...