210件ヒット
[201-210件を表示]
(0.052秒)
別のキーワード
ライブラリ
- ビルトイン (210)
キーワード
- [] (12)
-
abort
_ on _ exception (12) -
add
_ trace _ func (12) - backtrace (12)
-
backtrace
_ locations (24) - fetch (8)
- inspect (12)
- key? (12)
- name= (10)
- priority (12)
- priority= (12)
-
report
_ on _ exception (9) - run (12)
-
safe
_ level (7) -
set
_ trace _ func (12) - stop? (12)
-
to
_ s (8) - wakeup (12)
検索結果
-
Thread
# priority=(val) (20.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
...フォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b = Thread.new do
loop { count2 += 1 }
end
b.priority = -2
count1 = count2 = 0 # reset
sleep 1 # => 1
count1...