るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

キーワード

検索結果

Thread#priority -> Integer (18249.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 = Thr...
...ead.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 (18214.0)

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

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

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

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

Thread#priority=(val) (6149.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 = Thr...
...ead.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#weight -> Integer (107.0)

サーバを選択するための「重み」です。

...サーバを選択するための「重み」です。

Resolv::DNS::Resource::IN::SRV#priority が同じ場合に
この項目が利用されます。
重みに比例した確率でホストを選択すべきです。
返り値の範囲は 0 から 65535 までの整数です。
選択肢が一つ...