るりまサーチ

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

別のキーワード

  1. rake ext
  2. irb/ext/save-history save_history
  3. pathname sub_ext
  4. irb/ext/tracer use_tracer
  5. irb/ext/tracer use_tracer=

ライブラリ

クラス

検索結果

IRB::Context#thread -> Thread (21209.0)

現在のスレッドを返します。

...現在のスレッドを返します。

@see Thread.current...

ThreadsWait#next_wait(nonblock = nil) -> Thread (9208.0)

指定したスレッドのどれかが終了するまで待ちます。

... ThreadsWait::ErrNoFinishedThread が発生します。

@raise ErrNoWaitingThread 終了をまつスレッドが存在しない時、発生します。

@raise ErrNoFinishedThread nonblock がtrue でかつ、キューが空の時、発生します。

#使用例
require 'thwait'

thread
s...
...= []
2.times {|i|
thread
s << Thread.new { sleep i }
}

thall = ThreadsWait.new
thall.join_nowait(*threads)
until thall.empty?
th = thall.next_wait
p th
end

@see Queue#pop...