6件ヒット
[1-6件を表示]
(0.017秒)
ライブラリ
- ビルトイン (2)
-
shell
/ process-controller (1) - thwait (3)
クラス
-
Shell
:: ProcessController (1) - ThreadsWait (3)
モジュール
- Process (1)
-
RubyVM
:: MJIT (1)
キーワード
-
all
_ waits (2) -
last
_ status (1) - new (1)
- pause (1)
-
wait
_ to _ finish _ all _ process _ controllers (1)
検索結果
先頭5件
-
ThreadsWait
. all _ waits(*threads) -> () (27304.0) -
指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。
指定されたスレッドすべてが終了するまで待ちます。
ブロックが与えられた場合、スレッド終了時にブロックを評価します。
@param threads 終了するまでまつスレッドを一つもしくは複数指定します。
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) }
# 出力例
#=... -
ThreadsWait
. all _ waits(*threads) {|thread| . . . } -> () (27304.0) -
指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。
指定されたスレッドすべてが終了するまで待ちます。
ブロックが与えられた場合、スレッド終了時にブロックを評価します。
@param threads 終了するまでまつスレッドを一つもしくは複数指定します。
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) }
# 出力例
#=... -
Shell
:: ProcessController . wait _ to _ finish _ all _ process _ controllers -> () (18307.0) -
@todo
@todo -
ThreadsWait
. new(*threads) -> ThreadsWait (9304.0) -
指定されたスレッドの終了をまつための、スレッド同期オブジェクトをつくります。
指定されたスレッドの終了をまつための、スレッド同期オブジェクトをつくります。
@param threads 終了を待つスレッドを一つもしくは複数指定します。
使用例
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)
}
... -
RubyVM
:: MJIT . pause(wait: true) -> bool (325.0) -
MJIT を一時停止します。
MJIT を一時停止します。
@param wait 真のときは JIT キューが空になるまで待ちます。
@return 停止したときは true を、すでに停止していたときは false を返します。
@raise RuntimeError JIT が有効ではないときに発生します。
@see RubyVM::MJIT.enabled?, RubyVM::MJIT.resume -
Process
. last _ status -> Process :: Status | nil (22.0) -
カレントスレッドで最後に終了した子プロセスのステータスを返します。
カレントスレッドで最後に終了した子プロセスのステータスを返します。
変数 $? の値と同じです。
Process.wait Process.spawn("ruby", "-e", "exit 13")
Process.last_status # => #<Process::Status: pid 4825 exit 13>
カレントスレッドで子プロセスを実行したことがない場合は nil を返します。
Process.last_status # => nil
@see Process::Status
@see $?