37件ヒット
[1-37件を表示]
(0.015秒)
ライブラリ
- ビルトイン (13)
-
shell
/ process-controller (6) - thwait (18)
クラス
-
Shell
:: ProcessController (6) - ThreadsWait (18)
モジュール
- Process (7)
-
RubyVM
:: MJIT (6)
キーワード
-
all
_ waits (12) -
last
_ status (7) - new (6)
- pause (6)
-
wait
_ to _ finish _ all _ process _ controllers (6)
検索結果
先頭5件
-
ThreadsWait
. all _ waits(*threads) -> () (9101.0) -
指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。
...するまでまつスレッドを一つもしくは複数指定します。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
ThreadsWait.all_waits(*threads) {|th| printf("end %s\n", th.inspect) }
# 出力例
#=> #<Thread:0x21584 ru... -
ThreadsWait
. all _ waits(*threads) {|thread| . . . } -> () (9101.0) -
指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。
...するまでまつスレッドを一つもしくは複数指定します。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
ThreadsWait.all_waits(*threads) {|th| printf("end %s\n", th.inspect) }
# 出力例
#=> #<Thread:0x21584 ru... -
Shell
:: ProcessController . wait _ to _ finish _ all _ process _ controllers -> () (6102.0) -
@todo
@todo -
ThreadsWait
. new(*threads) -> ThreadsWait (3101.0) -
指定されたスレッドの終了をまつための、スレッド同期オブジェクトをつくります。
...ドを一つもしくは複数指定します。
使用例
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new(*threads)
thall.all_waits{|th|
printf("end %s\n", th.inspect)
}
# 出力例
#=> #<Thre... -
RubyVM
:: MJIT . pause(wait: true) -> bool (108.0) -
MJIT を一時停止します。
...MJIT を一時停止します。
@param wait 真のときは JIT キューが空になるまで待ちます。
@return 停止したときは true を、すでに停止していたときは false を返します。
@raise RuntimeError JIT が有効ではないときに発生します。
@see RubyV... -
Process
. last _ status -> Process :: Status | nil (7.0) -
カレントスレッドで最後に終了した子プロセスのステータスを返します。
...カレントスレッドで最後に終了した子プロセスのステータスを返します。
変数 $? の値と同じです。
Process.wait Process.spawn("ruby", "-e", "exit 13")
Process.last_status # => #<Process::Status: pid 4825 exit 13>
カレントスレッドで子プロセ...