るりまサーチ (Ruby 2.2.0)

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

別のキーワード

  1. _builtin status
  2. openssl status
  3. cgi http_status
  4. getoptlong status_yet
  5. getoptlong status_started

検索結果

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

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

...グナルを受信した場合などに実行が再
開(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
//}...