るりまサーチ

最速Rubyリファレンスマニュアル検索!
325件ヒット [1-100件を表示] (0.037秒)
トップページ > クエリ:set[x] > クエリ:thread[x]

別のキーワード

  1. stringio set_encoding
  2. _builtin set_encoding
  3. tracer set_get_line_procs
  4. set new
  5. openssl set

検索結果

<< 1 2 3 ... > >>

Thread#thread_variable_set(key, value) (21280.0)

引数 key で指定した名前のスレッドローカル変数に引数 value をセットしま す。

...]: Thread#[] でセットしたローカル変数(Fiber ローカル変数)と
異なり、セットした変数は Fiber を切り替えても共通で使える事に注意してく
ださい。

//emlist[例][ruby]{
thr = Thread.new do
Thread
.current.thread_variable_set(:cat, 'meow')
Thread
.c...
...urrent.thread_variable_set("dog", 'woof')
end
thr.join # => #<Thread:0x401b3f10 dead>
thr.thread_variables # => [:dog, :cat]
//}

@see Thread#thread_variable_get, Thread#[]...

Net::IMAP#thread(algorithm, search_keys, charset) -> [Net::IMAP::ThreadMember] (18329.0)

THREADコマンドを送り、メールボックスを検索した結果を スレッド形式の木構造で返します。

...THREADコマンドを送り、メールボックスを検索した結果を
スレッド形式の木構造で返します。

THREAD
コマンドは 5256 で定義されています。
詳しくはそちらを参照してください。
このコマンドは Net::IMAP#capability の返り値を見...
...渡します。
Net::IMAP#search と同等です。


@param algorithm スレッド構造構築アルゴリズム名(文字列)
@param search_key 検索条件(文字列配列)
@param charset 検索条件の解釈に用いるCHARSET名(文字列)
@see Net::IMAP::ThreadMember, Net::IMAP#uid_thread...

Thread#thread_variable_get(key) -> object | nil (15197.0)

引数 key で指定した名前のスレッドローカル変数を返します。

...注意]: Thread#[] でセットしたローカル変数(Fiber ローカル変数)と
異なり、Fiber を切り替えても同じ変数を返す事に注意してください。

例:

Thread
.new {
Thread
.current.thread_variable_set("foo", "bar") # スレッドローカル
Thread
.current...
...
Thread
.current.thread_variable_get("foo"), # スレッドローカル
Thread
.current["foo"], # Fiber ローカル
]
}.resume
}.join.value # => ['bar', nil]

この例の "bar" は Thread#thread_variable_get により得られ
た値で、nil はThread...
...#[] により得られた値です。

@see Thread#thread_variable_set, Thread#[]

@see https://magazine.rubyist.net/articles/0041/0041-200Special-note.html...

Thread#set_trace_func(pr) -> Proc | nil (15161.0)

スレッドにトレース用ハンドラを設定します。

...レースを解除します。

設定したハンドラを返します。

//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, #<Binding:0x00007fc8...
...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 (15155.0)

引数 key で指定した名前のスレッドローカル変数が存在する場合に true、そ うでない場合に false を返します。

...= 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#[]...

絞り込み条件を変える

VALUE rb_thread_local_aset(VALUE thread, ID id, VALUE val) (12300.0)

static VALUE rb_thread_abort_exc_set(VALUE thread, VALUE val) (12300.0)

static VALUE rb_thread_aset(VALUE thread, VALUE id, VALUE val) (12300.0)

static VALUE rb_thread_priority_set(VALUE thread, VALUE prio) (12300.0)

<< 1 2 3 ... > >>