160件ヒット
[1-100件を表示]
(0.267秒)
クラス
-
Encoding
:: Converter (55) -
Psych
:: Handler (11) -
Rake
:: InvocationChain (11) -
Rake
:: InvocationChain :: EmptyInvocationChain (11) -
Thread
:: Queue (33) -
Thread
:: SizedQueue (33) - ThreadsWait (6)
キーワード
- append (22)
- deq (22)
-
next
_ wait (6) - pop (22)
-
primitive
_ convert (44) -
primitive
_ errinfo (11) - shift (22)
検索結果
先頭5件
- Psych
:: Handler # empty -> () - Rake
:: InvocationChain :: EmptyInvocationChain # append(task _ name) -> Rake :: InvocationChain - Rake
:: InvocationChain # append(task _ name) -> Rake :: InvocationChain - ThreadsWait
# next _ wait(nonblock = nil) -> Thread - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol
-
Psych
:: Handler # empty -> () (27118.0) -
empty event が発生したときに呼び出されます。
...
empty event が発生したときに呼び出されます。
実際問題としてこれが呼び出される例は知られていません。... -
Rake
:: InvocationChain :: EmptyInvocationChain # append(task _ name) -> Rake :: InvocationChain (24301.0) -
与えられた値を追加した Rake::InvocationChain を返します。
...与えられた値を追加した Rake::InvocationChain を返します。
@param task_name 追加する値を指定します。... -
Rake
:: InvocationChain # append(task _ name) -> Rake :: InvocationChain (18319.0) -
与えられたタスク名を追加して新しい Rake::InvocationChain を返します。
...い Rake::InvocationChain を返します。
@param task_name 追加するタスク名を指定します。
@raise RuntimeError 循環したタスクの呼び出しを検出した場合に発生します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :......test_rake_app do
invocation_chain= Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
invocation_chain.append("task_b") # => LL("task_b", "task_a")
end
//}... -
ThreadsWait
# next _ wait(nonblock = nil) -> Thread (15307.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... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (9707.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_by......@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion aft......input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :fin... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (9707.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_by......@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion aft......input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :fin... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (9507.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_by......@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion aft......input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :fin... -
Thread
:: Queue # deq(non _ block = false) -> object (9313.0) -
キューからひとつ値を取り出します。キューが空の時、呼出元のスレッドは停止します。
...す。
@param non_block true を与えると、キューが空の時に例外 ThreadError が発生します。
//emlist[例][ruby]{
require 'thread'
q = Queue.new
th1 = Thread.start do
while resource = q.pop
puts resource
end
end
[:resource1, :resource2, :resource3, nil].each { |r|
q......r)
}
th1.join
//}
//emlist[例: nonblock = true][ruby]{
require 'thread'
q = Queue.new
th1 = Thread.start do
while resource = q.pop
puts resource
end
end
[:resource1, :resource2, :resource3, nil].each { |r|
q.push(r)
}
begin
th1.join
q.pop(true)
rescue => e
p e
end
# => resour......ce1
# resource2
# resource3
# => #<ThreadError: queue empty>
# => "queue empty"
//}... -
Thread
:: SizedQueue # deq(non _ block = false) -> object (9313.0) -
キューからひとつ値を取り出します。 キューに push しようと待っているスレッドがあれば、実行を再開させます。
...。
@param non_block true を与えると、キューが空の時に例外 ThreadError が発生します。
//emlist[例][ruby]{
require 'thread'
q = SizedQueue.new(4)
th1 = Thread.start do
while resource = q.pop
puts resource
end
end
[:resource1, :resource2, :resource3, nil].each{|r|......th1.join
# => resource1
# resource2
# resource3
//}
//emlist[例: nonblock = true][ruby]{
require 'thread'
q = SizedQueue.new(4)
th1 = Thread.start do
while resource = q.pop
puts resource
end
end
[:resource1, :resource2, :resource3, nil].each{|r|
q.push(r)
}
begin
th1.join
q.pop......(true)
rescue => e
p e
p e.message
end
# => resource1
# resource2
# resource3
# => #<ThreadError: queue empty>
# => "queue empty"
//}
@see Thread::Queue#pop... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (9307.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_by......@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion aft......input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :fin...