るりまサーチ

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

別のキーワード

  1. net/imap param
  2. win32ole win32ole_param
  3. bodytypetext param
  4. win32ole_param new
  5. bodytypebasic param

検索結果

<< < 1 2 3 >>

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#[]...
<< < 1 2 3 >>