3件ヒット
[1-3件を表示]
(0.040秒)
ライブラリ
- ビルトイン (1)
-
rdoc
/ single _ class (1) - thread (1)
キーワード
- ConditionVariable (1)
- Location (1)
- SingleClass (1)
検索結果
-
RDoc
:: SingleClass (36004.0) -
特異クラスを表現するクラスです。
特異クラスを表現するクラスです。
ライブラリの内部で使用します。 -
Thread
:: Backtrace :: Location (130.0) -
Ruby のフレームを表すクラスです。
...例1の実行結果:
caller_locations.rb:2:in `a'
caller_locations.rb:5:in `b'
caller_locations.rb:8:in `c'
//emlist[例2][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
p... -
Thread
:: ConditionVariable (40.0) -
スレッドの同期機構の一つである状態変数を実現するクラスです。
...が空になった場合、
あるいは満タンになった場合に Condition Variable を使って wait しています。
require 'thread'
class TinyQueue
def initialize(max=2)
@max = max
@full = ConditionVariable.new
@empty = ConditionVariable.new
@mutex = Mut...