るりまサーチ

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

別のキーワード

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

検索結果

Mutex#sleep(timeout = nil) -> Integer (22.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
//}...