12件ヒット
[1-12件を表示]
(0.094秒)
ライブラリ
- thwait (12)
キーワード
- join (6)
-
join
_ nowait (6)
検索結果
-
ThreadsWait
# join _ nowait(*threads) -> () (15207.0) -
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。 しかし、実際には終了をまちません。
...スレッドに指定されたthreadsを加えます。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads #=> []
thall.join_nowait(*threads)
p thall.threads #=> [#<Thread:0x21638 sleep>, #<T... -
ThreadsWait
# join(*threads) -> () (12207.0) -
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。
...つスレッドに指定されたthreadsを加えます。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads #=> []
thall.join(*threads)
p thall.threads
#=> [#<Thread:0x216ec dead>, #<Thre...