ライブラリ
- ビルトイン (386)
-
net
/ http (22) - optparse (22)
- pathname (11)
- set (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - shellwords (11)
- thread (14)
- thwait (18)
- tsort (21)
- win32ole (11)
- zlib (22)
クラス
- Array (68)
- BasicObject (22)
- Mutex (4)
- OptionParser (22)
- Pathname (11)
- Set (11)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (28)
- Thread (117)
-
Thread
:: Mutex (18) -
Thread
:: Queue (44) -
Thread
:: SizedQueue (33) - ThreadsWait (18)
-
WIN32OLE
_ VARIABLE (11) -
Zlib
:: Deflate (11) -
Zlib
:: Inflate (11)
モジュール
- Enumerable (77)
-
Net
:: HTTPHeader (22) - TSort (21)
キーワード
- * (11)
- [] (11)
-
_ _ send _ _ (22) -
abort
_ on _ exception (11) -
abort
_ on _ exception= (11) -
add
_ trace _ func (11) -
canonical
_ each (11) - chunk (11)
-
chunk
_ while (11) - deq (22)
- disjoint? (11)
-
each
_ capitalized (11) -
each
_ strongly _ connected _ component _ from (21) - fetch (7)
-
join
_ nowait (6) - load (11)
-
next
_ wait (6) -
num
_ waiting (11) -
ole
_ type _ detail (11) -
on
_ tail (11) - owned? (11)
- pack (19)
- pop (22)
- run (11)
-
set
_ dictionary (22) -
set
_ trace _ func (11) - shelljoin (11)
- shift (22)
-
slice
_ after (22) -
slice
_ before (22) -
slice
_ when (11) - split (17)
- sum (16)
-
thread
_ variable _ get (11) - unlock (11)
- unpack (11)
- value (11)
検索結果
先頭5件
-
Thread
# join -> self (24275.0) -
スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。
...場合、nil を返します。
@param limit タイムアウトする時間を整数か小数で指定します。単位は秒です。
@raise ThreadError join を実行することによってデッドロックが起きる場合に発生します。またカレントスレッドを join したと......。
以下は、生成したすべてのスレッドの終了を待つ例です。
threads = []
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.each {|t| t.join}... -
Thread
# join(limit) -> self | nil (24275.0) -
スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。
...場合、nil を返します。
@param limit タイムアウトする時間を整数か小数で指定します。単位は秒です。
@raise ThreadError join を実行することによってデッドロックが起きる場合に発生します。またカレントスレッドを join したと......。
以下は、生成したすべてのスレッドの終了を待つ例です。
threads = []
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.each {|t| t.join}... -
Array
# join(sep = $ , ) -> String (24232.0) -
配列の要素を文字列 sep を間に挟んで連結した文字列を返します。
...して)
join した文字列を連結します。
ただし、配列要素が自身を含むような無限にネストした配列に対しては、以下
のような結果になります。
//emlist[例][ruby]{
ary = [1,2,3]
ary.push ary
p ary # => [1, 2, 3, [...]]
p ary.join # =>......ArgumentError: recursive array join
//}
@param sep 間に挟む文字列を指定します。nil のときは空文字列を使います。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗黙の型変換を試みます。
@raise T......を指定した場合に発生します。
@raise ArgumentError 配列要素が自身を含むような無限にネストした配列に対
して join を呼んだ場合に発生します。
//emlist[例][ruby]{
[1, 2, 3].join('-') #=> "1-2-3"
//}
@see Array#*, $,... -
Pathname
# join(*args) -> Pathname (24208.0) -
与えられたパス名を連結します。
...{
require "pathname"
path0 = Pathname("/usr") # Pathname:/usr
path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby
# 上記の path0 の処理は下記の path1 と同様のパスになります
path1 = Pathname("/usr") + "bin/ruby" # Pathname:/usr/bin/ruby
path0 ==... -
Shell
# join(*item) -> String (24208.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
Shell
:: CommandProcessor # join(*item) -> String (24208.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
Shell
:: Filter # join(*item) -> String (24208.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
ThreadsWait
# join(*threads) -> () (24208.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>, #<Thread:0x21660 dead>, #<Thread:0x215d... -
ThreadsWait
# join _ nowait(*threads) -> () (12208.0) -
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。 しかし、実際には終了をまちません。
...hreadsを加えます。
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>, #<Thread:0x215ac sleep>, #<Thread:... -
Array
# shelljoin -> String (12201.0) -
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。
...て、Bourne シェルのコマンドライン中で安全に
使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。
array.shelljoin は、Shellwords.shelljoin(array) と等価です。
@return エスケ......ープ結果を連結した文字列を返します。
@see Shellwords.#shelljoin... -
Set
# disjoint?(set) -> bool (12201.0) -
self と set が互いに素な集合である場合に true を返します。
...は Set#intersect? を
使用します。
@param self Set オブジェクトを指定します。
@raise ArgumentError 引数が Set オブジェクトでない場合に発生します。
//emlist[][ruby]{
require 'set'
p Set[1, 2, 3].disjoint? Set[3, 4] # => false
p Set[1, 2, 3].disjoint? Set[4,......5] # => true
//}
@see Set#intersect?... -
String
# unpack(template) -> Array (6425.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...を含む配列を返します。
@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」......字のシステム依存性
各テンプレート文字の説明の中で、
short や long はシステムによらずそれぞれ 2, 4バイトサ
イズの数値(32ビットマシンで一般的なshort, longのサイズ)を意味していま
す。s, S, l, L に対しては直後に _ または......! を "s_" あるいは "s!" のように
続けることでシステム依存の short, long のサイズにすることもできます。
i, I (int)のサイズは常にシステム依存であり、n, N, v, V
のサイズは常にシステム依存ではない(!をつけられない)ことに...