671件ヒット
[601-671件を表示]
(0.073秒)
別のキーワード
ライブラリ
- ビルトイン (475)
-
net
/ http (24) - optparse (24)
- pathname (12)
- set (9)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - shellwords (12)
- thread (14)
- thwait (24)
- tsort (23)
- win32ole (12)
- zlib (24)
クラス
- Array (87)
- BasicObject (24)
- Mutex (4)
- OptionParser (24)
- Pathname (12)
- Set (12)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (31)
- Thread (164)
-
Thread
:: Mutex (20) -
Thread
:: Queue (48) -
Thread
:: SizedQueue (36) - ThreadsWait (24)
-
WIN32OLE
_ VARIABLE (12) -
Zlib
:: Deflate (12) -
Zlib
:: Inflate (12)
モジュール
- Enumerable (84)
-
Net
:: HTTPHeader (24) - TSort (23)
キーワード
- * (24)
- [] (12)
-
_ _ send _ _ (24) -
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) -
add
_ trace _ func (12) - alive? (12)
-
canonical
_ each (12) - chunk (12)
-
chunk
_ while (12) - deq (24)
- disjoint? (12)
-
each
_ capitalized (12) -
each
_ strongly _ connected _ component _ from (23) - empty? (6)
- fetch (8)
-
join
_ nowait (6) - load (12)
-
next
_ wait (6) -
num
_ waiting (12) -
ole
_ type _ detail (12) -
on
_ tail (12) - owned? (12)
- pack (21)
- pop (24)
- run (12)
-
set
_ dictionary (24) -
set
_ trace _ func (12) - shelljoin (12)
- shift (24)
-
slice
_ after (24) -
slice
_ before (24) -
slice
_ when (12) - split (19)
- sum (18)
-
thread
_ variable _ get (12) -
thread
_ variable _ set (12) - unlock (12)
- unpack (12)
- value (12)
- wakeup (12)
検索結果
先頭5件
-
Thread
:: Queue # num _ waiting -> Integer (7.0) -
キューを待っているスレッドの数を返します。
...キューを待っているスレッドの数を返します。
//emlist[例][ruby]{
require 'thread'
q = SizedQueue.new(1)
q.push(1)
t = Thread.new { q.push(2) }
sleep 0.05 until t.stop?
q.num_waiting # => 1
q.pop
t.join
//}... -
ThreadsWait
# empty? -> bool (7.0) -
同期されるスレッドが存在するならば true をかえします。
...ッドが存在するならば true をかえします。
使用例
require 'thwait'
threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads.empty? #=> true
thall.join(*threads)
p thall.threads.empty? #=> false... -
ThreadsWait
# next _ wait(nonblock = nil) -> Thread (7.0) -
指定したスレッドのどれかが終了するまで待ちます。
...rue でかつ、キューが空の時、発生します。
#使用例
require 'thwait'
threads = []
2.times {|i|
threads << Thread.new { sleep i }
}
thall = ThreadsWait.new
thall.join_nowait(*threads)
until thall.empty?
th = thall.next_wait
p th
end
@see Queue#pop... -
WIN32OLE
_ VARIABLE # ole _ type _ detail -> [String] (7.0) -
変数の型と属性を取得します。
...。
tobj = WIN32OLE_TYPE.new('Microsoft XML, v5.0', 'tagSTATSTG')
tobj.variables.each do |v|
puts "#{v.ole_type} [#{v.ole_type_detail.join(', ')}] #{v.name}"
end
出力結果
Unknown Type 31 [] pwcsName # => VT_LPWSTR はWIN32OLE::VARIANTで未定義なので変換できない
U... -
Zlib
:: Deflate # set _ dictionary(string) -> String (7.0) -
圧縮に用いる辞書を指定します。string を返します。 このメソッドは Zlib::Deflate.new, Zlib::ZStream#reset を呼び出した直後にのみ有効です。詳細は zlib.h を参照して下さい。
...sset = [ dict, 'taeagbamike', 'ugotagma', 'fugebogya' ]
g = [ 0, 1, 1, 1, 0, 0, 0, 3, 3, 3, 0, 0, 1, 1, 0, 0, 0, 1, 2, 2, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0]
str = (1..i).collect{|m| t = rand(g.size); sset.at(g[t])}.join("")
printf "%d normal:%d, dict:%d\n", i, case1(str), case2(str, dict)... -
Zlib
:: Inflate # set _ dictionary(string) -> String (7.0) -
展開に用いる辞書を指定します。string を返します。 このメソッドは Zlib::NeedDict 例外が発生した直後のみ 有効です。詳細は zlib.h を参照して下さい。
....inflate(comp_str)
end
dict = 'hoge_fuga_ugougo'
sset = [ dict, 'taeagbamike', 'ugotagma', 'fugebogya' ]
g = [ 0, 0, 0, 1, 1, 1, 0, 0, 0, 3, 3, 3, 0, 0, 1, 1,
0, 0, 0, 1, 2, 2, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0]
str = g.collect{|m| sset.at(m)}.join("")
case2(str, dict)... -
Array
# *(times) -> Array (3.0) -
配列の内容を times 回 繰り返した新しい配列を作成して返します。 値はコピーされないことに注意してください。
配列の内容を times 回 繰り返した新しい配列を作成して返します。
値はコピーされないことに注意してください。
@param times 繰り返したい回数を整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによ
る暗黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
@raise ArgumentError 引数に負の数を指定した場合に発生します。
//emlist[例][...