るりまサーチ

最速Rubyリファレンスマニュアル検索!
21件ヒット [1-21件を表示] (0.008秒)
トップページ > クエリ:chmod[x] > クエリ:timeout[x]

別のキーワード

  1. file chmod
  2. pathname chmod
  3. _builtin chmod
  4. fileutils chmod
  5. fileutils chmod_r

ライブラリ

モジュール

検索結果

Timeout.#timeout(sec, exception_class = nil) {|i| ... } -> object (35274.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

...c 秒の期限付きで実行します。
ブロックの実行時間が制限を過ぎたときは例外
Timeout
::Error が発生します。

exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはい...
...ウト
require 'timeout'

def calc_pi(min)
loop do
x = rand
y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end

t = 5
min = [ 0, 0]
begin
Timeout
.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end

printf "%...
...q 1 ]
then
let m1++
else
let m2++
fi
done
SHELL_EOT
}

File.chmod(0755, "loop.sh")
t = 10 # 10 秒でタイムアウト
begin
pid = nil
com = nil
Timeout
.timeout(t) {
# system だととまらない
# system("./loop.sh")
com = IO.popen...

Timeout.#timeout(sec, exception_class, message) {|i| ... } -> object (35274.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

...c 秒の期限付きで実行します。
ブロックの実行時間が制限を過ぎたときは例外
Timeout
::Error が発生します。

exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはい...
...ウト
require 'timeout'

def calc_pi(min)
loop do
x = rand
y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end

t = 5
min = [ 0, 0]
begin
Timeout
.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end

printf "%...
...q 1 ]
then
let m1++
else
let m2++
fi
done
SHELL_EOT
}

File.chmod(0755, "loop.sh")
t = 10 # 10 秒でタイムアウト
begin
pid = nil
com = nil
Timeout
.timeout(t) {
# system だととまらない
# system("./loop.sh")
com = IO.popen...

Timeout.#timeout(sec, exception_class = nil) {|i| ... } -> object (35273.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

...c 秒の期限付きで実行します。
ブロックの実行時間が制限を過ぎたときは例外
Timeout
::Error が発生します。

exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはい...
...ウト
require 'timeout'

def calc_pi(min)
loop do
x = rand
y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end

t = 5
min = [ 0, 0]
begin
Timeout
.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end

printf "%...
...q 1 ]
then
let m1++
else
let m2++
fi
done
SHELL_EOT
}

File.chmod(0755, "loop.sh")
t = 10 # 10 秒でタイムアウト
begin
pid = nil
com = nil
Timeout
.timeout(t) {
# system だととまらない
# system("./loop.sh")
com = IO.popen...