るりまサーチ

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

別のキーワード

  1. _builtin times
  2. integer times
  3. process times
  4. times _builtin

ライブラリ

モジュール

キーワード

検索結果

<< < ... 3 4 5 >>

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

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

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

#使用例
require 'thwait'

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

thall = ThreadsWait.new
thall.join_nowait(*threads)
until thall.empty?
th = thall.next_w...

ThreadsWait#threads -> Array (7.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>, #<...

Array#*(sep) -> String (4.0)

指定された sep を間にはさんで連結した文字列を生成して返します。Array#join(sep) と同じ動作をします。

指定された sep を間にはさんで連結した文字列を生成して返します。Array#join(sep) と同じ動作をします。

@param sep 文字列を指定します。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗黙の型変換を試みます。

//emlist[例][ruby]{
p [1,2,3] * ","
# => "1,2,3"
//}

@see Array#join
<< < ... 3 4 5 >>