るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. matrix p
  5. rsa p

ライブラリ

検索結果

Thread#priority -> Integer (24237.0)

スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。

...レッドの
priority
を引き継ぎます。

@param val スレッドの優先度を指定します。プラットフォームに依存します。

//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 # => 13809431
count2 # => 11571921
//}...

Resolv::DNS::Resource::IN::SRV#priority -> Integer (24214.0)

ホストの優先順位を返します。

...ホストの優先順位を返します。

クライアントは利用可能なホストの中で最も priority
小さい数値のホストを利用しなければなりません。

priority
が同じならば Resolv::DNS::Resource::IN::SRV#weight
で定義されるようにホストを選ぶ...

Thread#priority=(val) (12237.0)

スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。

...レッドの
priority
を引き継ぎます。

@param val スレッドの優先度を指定します。プラットフォームに依存します。

//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 # => 13809431
count2 # => 11571921
//}...