23件ヒット
[1-23件を表示]
(0.055秒)
クラス
- SignalException (11)
- Thread (3)
-
Thread
:: ConditionVariable (9)
キーワード
-
ignore
_ deadlock= (3) - signm (11)
検索結果
先頭3件
-
Thread
:: ConditionVariable # signal -> self (18122.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
# signm -> String (3009.0) -
self.message のエイリアスです。
...self.message のエイリアスです。
//emlist[例][ruby]{
begin
Process.kill('HUP', Process.pid)
sleep
rescue SignalException => e
puts e.signm # => SIGHUP
end
//}... -
Thread
# ignore _ deadlock=(bool) (15.0) -
デッドロック検知を無視する機能をon/offします。デフォルト値はfalseです。
...。
trueを渡すとデッドロックを検知しなくなります。
//emlist[][ruby]{
Thread.ignore_deadlock = true
queue = Thread::Queue.new
trap(:SIGUSR1){queue.push "Received signal"}
# ignore_deadlockがfalseだとエラーが発生する
puts queue.pop
//}
@see Thread#ignore_deadlock...