218件ヒット
[201-218件を表示]
(0.097秒)
別のキーワード
ライブラリ
- ビルトイン (218)
キーワード
- [] (12)
- []= (12)
-
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) -
add
_ trace _ func (12) -
backtrace
_ locations (24) - fetch (8)
- join (24)
- key? (12)
-
pending
_ interrupt? (12) - priority (12)
- priority= (12)
- raise (12)
-
report
_ on _ exception (9) -
report
_ on _ exception= (9) -
set
_ trace _ func (12) -
thread
_ variable? (12)
検索結果
-
Thread
# set _ trace _ func(pr) -> Proc | nil (8.0) -
スレッドにトレース用ハンドラを設定します。
...nil を渡すとトレースを解除します。
設定したハンドラを返します。
//emlist[例][ruby]{
th = Thread.new do
class Trace
end
2.to_s
Thread.current.set_trace_func nil
3.to_s
end
th.set_trace_func lambda {|*arg| p arg }
th.join
# => ["line", "example.rb", 2, nil,......fc8de967798>, Thread]
# => ["c-return", "example.rb", 5, :current, #<Binding:0x00007fc8de9673b0>, Thread]
# => ["c-call", "example.rb", 5, :set_trace_func, #<Binding:0x00007fc8de966fc8>, Thread]
//}
@param pr トレースハンドラ(Proc オブジェクト) もしくは nil
@see Thread#add_trace_f... -
Thread
# thread _ variable?(key) -> bool (8.0) -
引数 key で指定した名前のスレッドローカル変数が存在する場合に true、そ うでない場合に false を返します。
...に false を返します。
@param key 変数名を String か Symbol で指定します。
me = Thread.current
me.thread_variable_set(:oliver, "a")
me.thread_variable?(:oliver) # => true
me.thread_variable?(:stanley) # => false
[注意]: Thread#[] でセットしたローカ......ル変数(Fiber ローカル変数)が
対象ではない事に注意してください。
@see Thread#thread_variable_get, Thread#[]...