17件ヒット
[1-17件を表示]
(0.148秒)
クラス
- ThreadsWait (6)
-
Zlib
:: Inflate (11)
検索結果
-
Zlib
:: Inflate # <<(string) -> self (21225.0) -
Zlib::Inflate#inflate と同じように string を 展開ストリームに入力しますが、Zlib::Inflate オブジェクト そのものを返します。展開ストリームからの出力は、 出力バッファに保存されます。
...Zlib::Inflate#inflate と同じように string を
展開ストリームに入力しますが、Zlib::Inflate オブジェクト
そのものを返します。展開ストリームからの出力は、
出力バッファに保存されます。
require 'zlib'
cstr = "x\234\313\310OOUH+MOTH\3......15K\001\000!\251\004\276"
inz = Zlib::Inflate.new
inz << cstr[0, 10]
p inz.flush_next_out #=> "hoge fu"
inz << cstr[10..-1]
p inz.flush_next_out #=> "ga end"... -
ThreadsWait
# next _ wait(nonblock = nil) -> Thread (12214.0) -
指定したスレッドのどれかが終了するまで待ちます。
...で待ちます。
@param nonblock true を与えると、キューが空の時、例外 ThreadsWait::ErrNoFinishedThread が発生します。
@raise ErrNoWaitingThread 終了をまつスレッドが存在しない時、発生します。
@raise 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_wait
p th
end
@see Queue#pop...