るりまサーチ

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

別のキーワード

  1. _builtin sleep
  2. kernel sleep
  3. mutex sleep
  4. sleep
  5. sleep _builtin

ライブラリ

キーワード

検索結果

Thread::ConditionVariable#signal -> self (18114.0)

状態変数を待っているスレッドを1つ再開します。再開された スレッドは Thread::ConditionVariable#wait で指定した mutex のロックを試みます。

...onditionVariable.new
flg = true

3.times {
Thread.start {
mutex.synchronize {
puts "a1"
while (flg)
cv.wait(mutex)
end
puts "a2"
}
}
}

Thread.start {
mutex.synchronize {
flg = false
cv.signal
}
}

sleep
1

# => a1
# => a1
# => a1
# => a2
//}...

SignalException#signo -> Integer (3013.0)

self のシグナル番号を返します。

...self のシグナル番号を返します。

//emlist[例][ruby]{
p Signal.signame(1) # => "HUP"
begin
Process.kill('HUP', Process.pid)
sleep

rescue SignalException => e
p e.signo # => 1
end
//}...

SignalException#signm -> String (3007.0)

self.message のエイリアスです。

...self.message のエイリアスです。

//emlist[例][ruby]{
begin
Process.kill('HUP', Process.pid)
sleep

rescue SignalException => e
puts e.signm # => SIGHUP
end
//}...