1297件ヒット
[1-100件を表示]
(0.185秒)
ライブラリ
クラス
-
DRb
:: DRbServer (12) - Exception (12)
- Fiber (24)
- IO (24)
-
IRB
:: Context (12) - Monitor (42)
- Mutex (8)
-
Net
:: IMAP (48) -
Net
:: IMAP :: ThreadMember (24) -
Rake
:: Application (12) - Thread (441)
-
Thread
:: Backtrace :: Location (84) -
Thread
:: ConditionVariable (36) -
Thread
:: Mutex (70) -
Thread
:: Queue (152) -
Thread
:: SizedQueue (130) - ThreadGroup (48)
- ThreadsWait (42)
- Tracer (12)
-
WEBrick
:: GenericServer (12)
モジュール
- Kernel (16)
- MonitorMixin (12)
-
Sync
_ m (24)
キーワード
- << (24)
- [] (12)
- []= (12)
-
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) -
absolute
_ path (12) - add (12)
-
add
_ trace _ func (12) - alive? (12)
-
all
_ waits (6) - backtrace (12)
-
backtrace
_ locations (36) -
base
_ label (12) - broadcast (12)
- children (12)
- clear (12)
-
client
_ thread (12) -
client
_ thread= (12) - close (20)
- closed? (10)
- deq (24)
- empty? (26)
- enclose (12)
- enclosed? (12)
- enq (24)
- enter (12)
- eof (12)
- eof? (12)
- exit (24)
- fetch (8)
- finished? (6)
-
get
_ thread _ no (12) - group (12)
-
ignore
_ deadlock (4) -
ignore
_ deadlock= (4) - inspect (24)
- join (30)
-
join
_ nowait (6) - key? (12)
- keys (12)
- kill (12)
- label (12)
- length (20)
- lineno (12)
- list (12)
- lock (12)
- locked? (10)
- max (12)
- max= (12)
-
mon
_ enter (18) -
mon
_ exit (6) - name (10)
- name= (10)
-
next
_ wait (6) -
num
_ waiting (12) - owned? (12)
- path (12)
-
pending
_ interrupt? (12) - pop (24)
- priority (12)
- priority= (12)
- push (24)
- raise (12)
-
report
_ on _ exception (9) -
report
_ on _ exception= (9) - resume (12)
- run (12)
-
safe
_ level (7) - seqno (12)
-
set
_ trace _ func (12) - shift (24)
- signal (12)
- size (20)
- sleep (12)
- status (12)
- stop? (12)
-
sync
_ ex _ locker (6) -
sync
_ ex _ locker= (6) -
sync
_ upgrade _ waiting (6) -
sync
_ waiting (6) - synchronize (10)
- terminate (12)
-
thread
_ variable? (12) -
thread
_ variable _ get (12) -
thread
_ variable _ set (12) - threads (6)
- timeout (16)
-
to
_ s (20) - tokens (12)
- transfer (12)
-
try
_ lock (10) -
uid
_ thread (12) - unlock (12)
- value (12)
- wait (12)
-
wait
_ for _ cond (6) - wakeup (12)
検索結果
先頭5件
-
DRb
:: DRbServer # thread -> Thread (27403.0) -
サーバのメインスレッドを返します。
サーバのメインスレッドを返します。
このスレッドはクライアントからの接続を受け付けるスレッドであって、
クライアントへの応答をするスレッドではありません。 -
Net
:: IMAP # thread(algorithm , search _ keys , charset) -> [Net :: IMAP :: ThreadMember] (24530.0) -
THREADコマンドを送り、メールボックスを検索した結果を スレッド形式の木構造で返します。
...THREADコマンドを送り、メールボックスを検索した結果を
スレッド形式の木構造で返します。
THREAD コマンドは 5256 で定義されています。
詳しくはそちらを参照してください。
このコマンドは Net::IMAP#capability の返り値を見......能です。
* "ORDEREDSUBJECT" subjectを使って平坦に区切るだけ
* "REFERENCES" どのメッセージに返事をしているかを見て木構造を作る
詳しくは 5256 を見てください。
search_key には検索条件を渡します。
Net::IMAP#search と同等です。......@param algorithm スレッド構造構築アルゴリズム名(文字列)
@param search_key 検索条件(文字列配列)
@param charset 検索条件の解釈に用いるCHARSET名(文字列)
@see Net::IMAP::ThreadMember, Net::IMAP#uid_thread... -
IRB
:: Context # thread -> Thread (24409.0) -
現在のスレッドを返します。
...現在のスレッドを返します。
@see Thread.current... -
Thread
# thread _ variable _ get(key) -> object | nil (24286.0) -
引数 key で指定した名前のスレッドローカル変数を返します。
...key で指定した名前のスレッドローカル変数を返します。
[注意]: Thread#[] でセットしたローカル変数(Fiber ローカル変数)と
異なり、Fiber を切り替えても同じ変数を返す事に注意してください。
例:
Thread.new {
Thread.current.......thread_variable_set("foo", "bar") # スレッドローカル
Thread.current["foo"] = "bar" # Fiber ローカル
Fiber.new {
Fiber.yield [
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/00... -
Thread
# thread _ variable _ set(key , value) (24268.0) -
引数 key で指定した名前のスレッドローカル変数に引数 value をセットしま す。
...引数 key で指定した名前のスレッドローカル変数に引数 value をセットしま
す。
[注意]: Thread#[] でセットしたローカル変数(Fiber ローカル変数)と
異なり、セットした変数は Fiber を切り替えても共通で使える事に注意してく......。
//emlist[例][ruby]{
thr = Thread.new do
Thread.current.thread_variable_set(:cat, 'meow')
Thread.current.thread_variable_set("dog", 'woof')
end
thr.join # => #<Thread:0x401b3f10 dead>
thr.thread_variables # => [:dog, :cat]
//}
@see Thread#thread_variable_get, Thread#[]... -
Thread
# thread _ variable?(key) -> bool (24250.0) -
引数 key で指定した名前のスレッドローカル変数が存在する場合に true、そ うでない場合に false を返します。
...key で指定した名前のスレッドローカル変数が存在する場合に true、そ
うでない場合に 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#[]... -
Thread
:: Queue # clear -> () (20107.0) -
キューを空にします。返り値は不定です。
...キューを空にします。返り値は不定です。
//emlist[例][ruby]{
require 'thread'
q = Queue.new
[:resource1, :resource2, :resource3, nil].each { |r| q.push(r) }
q.length # => 4
q.clear
q.length # => 0
//}... -
Thread
# report _ on _ exception -> bool (18255.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...derr に報告します。
デフォルトはスレッド作成時の Thread.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread......; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Thread:0x00007fc3f48c7908@(irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00......007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<Thread:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception... -
Thread
# report _ on _ exception=(newstate) (18255.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...derr に報告します。
デフォルトはスレッド作成時の Thread.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread......; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Thread:0x00007fc3f48c7908@(irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00......007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<Thread:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception... -
ThreadsWait
# threads -> Array (18231.0) -
同期されるスレッドの一覧を配列で返します。
...ドの一覧を配列で返します。
使用例
require 'thwait'
threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new(*threads)
p thall.threads
#=> [#<Thread:0x21750 sleep>, #<Thread:0x216c4 sleep>, #<Thread:0x21638 sleep>]... -
Thread
# ignore _ deadlock=(bool) (18119.0) -
デッドロック検知を無視する機能をon/offします。デフォルト値はfalseです。
...seです。
trueを渡すとデッドロックを検知しなくなります。
//emlist[][ruby]{
Thread.ignore_deadlock = true
queue = Thread::Queue.new
trap(:SIGUSR1){queue.push "Received signal"}
# ignore_deadlockがfalseだとエラーが発生する
puts queue.pop
//}
@see Thread#ignore_de...