クラス
-
ARGF
. class (9) - IO (22)
-
Process
:: Status (11) -
Thread
:: ConditionVariable (27) -
Thread
:: Queue (18)
モジュール
- Kernel (11)
- Process (73)
-
RubyVM
:: MJIT (6) - Signal (22)
キーワード
-
$ ? (11) - >> (11)
- ConditionVariable (9)
- Status (11)
- WaitReadable (11)
- WaitWritable (11)
- broadcast (9)
- close (9)
-
last
_ status (7) -
num
_ waiting (9) - pause (6)
-
read
_ nonblock (20) - setpgrp (11)
- signal (9)
- trap (22)
- wait2 (11)
- waitall (11)
- waitpid (11)
- waitpid2 (11)
-
write
_ nonblock (11)
検索結果
先頭5件
- Process
. # wait(pid = -1 , flags = 0) -> Integer | nil - Thread
:: ConditionVariable # wait(mutex , timeout = nil) -> self - Process
. # wait2(pid = -1 , flags = 0) -> [Integer , Process :: Status] | nil - Process
. # waitpid(pid = -1 , flags = 0) -> Integer | nil - Process
. # waitpid2(pid = -1 , flags = 0) -> [Integer , Process :: Status] | nil
-
Process
. # wait(pid = -1 , flags = 0) -> Integer | nil (18138.0) -
pid で指定される特定の子プロセスの終了を待ち、そのプロセスが 終了した時に pid を返します。 wait2, waitpid2 は子プロセスの pid と終了ステータスを表す Process::Status オブジェクトの配列を返します。 ノンブロッキングモードで子プロセスがまだ終了していない時には nil を返します。
...pid で指定される特定の子プロセスの終了を待ち、そのプロセスが
終了した時に pid を返します。
wait2, waitpid2 は子プロセスの pid と終了ステータスを表す
Process::Status オブジェクトの配列を返します。
ノンブロッキングモー......。waitpid(2) か wait4(2) の実装されていないマシンでは
flags はいつも nil または 0 を指定する必要があります。
@raise Errno::ECHILD 子プロセスが存在しない場合に発生します。
//emlist[][ruby]{
pid = fork { sleep 1 }
Process.wait2 # =......> [70024, #<Process::Status: pid 70024 exit 0>]
//}
@see wait(2), waitpid(2)... -
Thread
:: ConditionVariable # wait(mutex , timeout = nil) -> self (18103.0) -
mutex のロックを解放し、カレントスレッドを停止します。 Thread::ConditionVariable#signalまたは、 Thread::ConditionVariable#broadcastで送られたシグナルを 受け取ると、mutexのロックを取得し、実行状態となります。
mutex のロックを解放し、カレントスレッドを停止します。
Thread::ConditionVariable#signalまたは、
Thread::ConditionVariable#broadcastで送られたシグナルを
受け取ると、mutexのロックを取得し、実行状態となります。
@param mutex Mutex オブジェクトを指定します。
@param timeout スリープする秒数を指定します。この場合はシグナルを受け取
らなかった場合でも指定した秒数が経過するとスリープを終了
します。省略するとスリープし続け... -
Process
. # wait2(pid = -1 , flags = 0) -> [Integer , Process :: Status] | nil (6138.0) -
pid で指定される特定の子プロセスの終了を待ち、そのプロセスが 終了した時に pid を返します。 wait2, waitpid2 は子プロセスの pid と終了ステータスを表す Process::Status オブジェクトの配列を返します。 ノンブロッキングモードで子プロセスがまだ終了していない時には nil を返します。
...pid で指定される特定の子プロセスの終了を待ち、そのプロセスが
終了した時に pid を返します。
wait2, waitpid2 は子プロセスの pid と終了ステータスを表す
Process::Status オブジェクトの配列を返します。
ノンブロッキングモー......。waitpid(2) か wait4(2) の実装されていないマシンでは
flags はいつも nil または 0 を指定する必要があります。
@raise Errno::ECHILD 子プロセスが存在しない場合に発生します。
//emlist[][ruby]{
pid = fork { sleep 1 }
Process.wait2 # =......> [70024, #<Process::Status: pid 70024 exit 0>]
//}
@see wait(2), waitpid(2)... -
Process
. # waitpid(pid = -1 , flags = 0) -> Integer | nil (6138.0) -
pid で指定される特定の子プロセスの終了を待ち、そのプロセスが 終了した時に pid を返します。 wait2, waitpid2 は子プロセスの pid と終了ステータスを表す Process::Status オブジェクトの配列を返します。 ノンブロッキングモードで子プロセスがまだ終了していない時には nil を返します。
...pid で指定される特定の子プロセスの終了を待ち、そのプロセスが
終了した時に pid を返します。
wait2, waitpid2 は子プロセスの pid と終了ステータスを表す
Process::Status オブジェクトの配列を返します。
ノンブロッキングモー......。waitpid(2) か wait4(2) の実装されていないマシンでは
flags はいつも nil または 0 を指定する必要があります。
@raise Errno::ECHILD 子プロセスが存在しない場合に発生します。
//emlist[][ruby]{
pid = fork { sleep 1 }
Process.wait2 # =......> [70024, #<Process::Status: pid 70024 exit 0>]
//}
@see wait(2), waitpid(2)... -
Process
. # waitpid2(pid = -1 , flags = 0) -> [Integer , Process :: Status] | nil (6138.0) -
pid で指定される特定の子プロセスの終了を待ち、そのプロセスが 終了した時に pid を返します。 wait2, waitpid2 は子プロセスの pid と終了ステータスを表す Process::Status オブジェクトの配列を返します。 ノンブロッキングモードで子プロセスがまだ終了していない時には nil を返します。
...pid で指定される特定の子プロセスの終了を待ち、そのプロセスが
終了した時に pid を返します。
wait2, waitpid2 は子プロセスの pid と終了ステータスを表す
Process::Status オブジェクトの配列を返します。
ノンブロッキングモー......。waitpid(2) か wait4(2) の実装されていないマシンでは
flags はいつも nil または 0 を指定する必要があります。
@raise Errno::ECHILD 子プロセスが存在しない場合に発生します。
//emlist[][ruby]{
pid = fork { sleep 1 }
Process.wait2 # =......> [70024, #<Process::Status: pid 70024 exit 0>]
//}
@see wait(2), waitpid(2)... -
Process
. # waitall -> [[Integer , Process :: Status]] (6102.0) -
全ての子プロセスが終了するのを待ちます。 終了した子プロセスの pid と終了ステータス (Process::Status) の配列の配列を返します。 子プロセスがいない状態でこのメソッドを呼び出すと空の配列を返します。
...配列を返します。
$? には最後に終了した子プロセスの Process::Status オブジェクトが設定されます。
2.times {|n|
Process.fork() { exit n }
}
p Process.waitall
#=> :Status: pid=2766,exited(1)>], [2765, #<Process::Status: pid=2765,exited(1)>... -
Thread
:: Queue # num _ waiting -> Integer (6102.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
//}... -
IO
:: WaitReadable (6002.0) -
例外が読み込み待ちで発生したことを意味します。
例外が読み込み待ちで発生したことを意味します。
例外オブジェクトに extend されます。詳しくは
IO#read_nonblock を参照してください。 -
IO
:: WaitWritable (6002.0) -
例外が書き込み待ちで発生したことを意味します。
例外が書き込み待ちで発生したことを意味します。
例外オブジェクトに extend されます。詳しくは
IO#write_nonblock を参照してください。 -
IO
# write _ nonblock(string , exception: true) -> Integer | :wait _ writable (109.0) -
IO をノンブロッキングモードに設定し、string を write(2) システムコールで書き出します。
...発生した例外 がErrno::EAGAIN、 Errno::EWOULDBLOCK である場合は、
その例外オブジェクトに IO::WaitWritable が Object#extend
されます。よって IO::WaitWritable を write_nonblock のリトライが必要
かの判定に用いることができます。
@param string......@param exception false を指定すると、書き込み時に Errno::EAGAIN、Errno::EWOULDBLOCK が発生
する代わりに :wait_writable を返します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX wr...