ライブラリ
クラス
-
DRb
:: TimerIdConv (12) - IO (72)
- Monitor (6)
-
MonitorMixin
:: ConditionVariable (12) - Mutex (2)
-
Net
:: FTP (48) -
Net
:: HTTP (134) -
Net
:: POP3 (48) -
Net
:: SMTP (48) -
OpenSSL
:: SSL :: SSLContext (48) -
OpenSSL
:: SSL :: Session (48) -
Resolv
:: DNS (12) - Socket (48)
- TCPSocket (10)
- Thread (12)
-
Thread
:: ConditionVariable (12) -
Thread
:: Mutex (10)
モジュール
- Etc (12)
- Kernel (28)
-
Socket
:: Constants (24) - Timeout (21)
-
WEBrick
:: HTTPStatus (24)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - Error (12)
- GatewayTimeout (12)
- HTTPGatewayTimeOut (12)
- HTTPGatewayTimeout (7)
- HTTPRequestTimeOut (12)
- HTTPRequestTimeout (7)
-
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - OpenTimeout (12)
-
RC
_ GATEWAY _ TIMEOUT (12) -
RC
_ REQUEST _ TIMEOUT (12) - ReadTimeout (12)
- RequestTimeout (12)
-
SC
_ TIMEOUTS (12) -
SO
_ RCVTIMEO (24) -
SO
_ SNDTIMEO (24) - Timeout (12)
- TimeoutError (8)
- TimerIdConv (12)
- WriteTimeout (7)
-
continue
_ timeout (12) -
continue
_ timeout= (12) - expect (24)
-
handle
_ interrupt (12) -
keep
_ alive _ timeout (12) -
keep
_ alive _ timeout= (12) - new (17)
- open (5)
-
open
_ timeout (48) -
open
_ timeout= (48) -
rb
_ thread _ select (1) -
read
_ timeout (48) -
read
_ timeout= (48) -
ruby 1
. 6 feature (12) - select (24)
- sleep (12)
-
ssl
_ timeout (24) -
ssl
_ timeout= (24) - tcp (24)
- time= (12)
- timeout= (24)
- timeouts= (12)
- wait (36)
-
wait
_ for _ cond (6) -
wait
_ readable (12) -
wait
_ writable (12) -
write
_ timeout (7) -
write
_ timeout= (7)
検索結果
先頭5件
-
Kernel
. # select(reads , writes = [] , excepts = [] , timeout = nil) -> [[IO]] | nil (207.0) -
IO.select と同じです。
...IO.select と同じです。
@param reads IO.select 参照
@param writes IO.select 参照
@param excepts IO.select 参照
@param timeout IO.select 参照
@see IO.select... -
Monitor
# wait _ for _ cond(cond , timeout) -> bool (207.0) -
MonitorMixin::ConditionVariable 用の内部メソッドです。
...MonitorMixin::ConditionVariable 用の内部メソッドです。
@param cond Thread::ConditionVariable を指定します。
@param timeout タイムアウトまでの秒数。指定しなかった場合はタイムアウトしません。
@return タイムアウトしたときは false を返し... -
Monitor
# wait _ for _ cond(cond , timeout) -> true (207.0) -
MonitorMixin::ConditionVariable 用の内部メソッドです。
...MonitorMixin::ConditionVariable 用の内部メソッドです。
@param cond Thread::ConditionVariable を指定します。
@param timeout タイムアウトまでの秒数。指定しなかった場合はタイムアウトしません。
@return Ruby 1.9 の頃からのバグで常に true を... -
Mutex
# sleep(timeout = nil) -> Integer (207.0) -
与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
...与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
@param timeout スリープする秒数を指定します。省略するとスリープし続けます。
@return スリープしていた秒数を返します。
@raise ThreadError... -
Thread
:: ConditionVariable # wait(mutex , timeout = nil) -> self (207.0) -
mutex のロックを解放し、カレントスレッドを停止します。 Thread::ConditionVariable#signalまたは、 Thread::ConditionVariable#broadcastで送られたシグナルを 受け取ると、mutexのロックを取得し、実行状態となります。
...と、mutexのロックを取得し、実行状態となります。
@param mutex Thread::Mutex オブジェクトを指定します。
@param timeout スリープする秒数を指定します。この場合はシグナルを受け取
らなかった場合でも指定した秒数......け取ると、mutexのロックを取得し、実行状態となります。
@param mutex Mutex オブジェクトを指定します。
@param timeout スリープする秒数を指定します。この場合はシグナルを受け取
らなかった場合でも指定した秒数... -
Thread
:: Mutex # sleep(timeout = nil) -> Integer (207.0) -
与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
...与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
@param timeout スリープする秒数を指定します。省略するとスリープし続けます。
@return スリープしていた秒数を返します。
@raise ThreadError......与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
@param timeout スリープする秒数を指定します。省略するとスリープし続けます。
@return タイムアウトした時は nil を、それ以外はスリープし... -
NEWS for Ruby 3
. 1 . 0 (132.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...asure_total_time = true でGCの計測を有効にします。計測によってオーバーヘッドが発生する可能性があります。デフォルトで有効になっています。 GC.measure_total_time は現在の設定を返します。 GC.stat[:time] または GC.stat(:time) は、測......定された時間をミリ秒で返します。 10917
* GC.total_time が計測された時間をナノ秒で返します。 10917
* Integer
* 新規メソッド
* Integer.try_convert が追加されました。 15211
* Kernel
* 変更されたメソッド
* Kernel#l......メソッド
* Addrinfo.getaddrinfo がaddress_resolveフックをサポートしました。 17370
* ブロックなしの Timeout.timeout に timeout_after フックが導入されました。 17470
* 新しいSchedulerのフックのio_readとio_writeが導入され、zero-copy... -
ruby 1
. 6 feature (66.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...class for true (TypeError)
ruby 1.6.6 (2001-12-26) [i586-linux]
=> ruby 1.6.7 (2002-03-01) [i586-linux]
"foo"
: ((<time>)), URI
追加されました。
: Ruby/Tk
バグ修正、機能追加 ((<ruby-dev:16139>)),((<ruby-dev:16153>))。
: 数値リテラルの......<ruby-list:32089>))
: Time#localtime
: Time#gmtime
フリーズした Time オブジェクトに対して一度だけ呼び出しを許しました。
t = Time.new.freeze
p t.gmtime
p t.localtime
=> -:2:in `gmtime': can't modify frozen Time (TypeError)......したリゾルバは、timeout の制御が効きます(つまり、名前解
決中にThreadが切替え可能ということです)
require 'resolv'
p Resolv.new.getaddress("www.ruby-lang.org").to_s
=> /usr/local/lib/ruby/1.6/resolv.rb:160: warning: timeout (...) interpreted as me... -
NEWS for Ruby 2
. 6 . 0 (60.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...して追加されました。 13784
* Time
* 新機能
* Time.new と Time#getlocal が UTC オフセット文字列と同様に
タイムゾーンオブジェクトを受け付けるようになりました。Time#+,
Time#-, Time#succ もタイムゾーンを維持し......ector#[]=
* Net::HTTP
* 新規オプション
* :write_timeout キーワード引数が Net::HTTP.new に追加されました。 13396
* 新規メソッド
* Net::HTTP#write_timeout と Net::HTTP#write_timeout= が追加されました。 13396
* 新規定数
* Net:......14045
* さらに Ruby 2.6 では渡されたブロックの呼び出しのパフォーマンスが改善されました。
* JIT (Just-in-time) コンパイラの初期実装が導入されました。 14235 [実験的]
* JIT を有効化する --jit コマンドラインオプション... -
NEWS for Ruby 2
. 7 . 0 (36.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ymbol#end_with?が追加されました。 16348
* Time
* 新規メソッド
* Time#ceilが追加されました。 15772
* Time#floorが追加されました。 15653
* 変更されたメソッド
* Time#inspectがTime#to_sから分離されて、秒未満も......のdefault gemはruby-coreでの変更のみで、まだrubygems.orgでは公開されていません。
* monitor
* observer
* timeout
* tracer
* uri
* yaml
* did_you_mean gemはbundled gemからdefault gemになりました。
* pathname
* Kernel#Pathna... -
NEWS for Ruby 2
. 3 . 0 (30.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ンに --debug または --debug=frozen-string-literal を付けて実行すると、
freeze された文字列を操作しようとして RuntimeError が発生したときにそのオブジェクトが生成された位置を表示します。
11725
* safe navigation operator (ぼ......文字列のエンコーディングを設定すると予期しない動作の原因となるかもしれません。
11827
* timeout
* Object#timeoutは呼び出すと非推奨として警告されるようになりました。
=== 標準添付ライブラリの互換性 (機能追加......トになりました。
Net::FTP.default_passive= で変更することができます。
11612
* Net::HTTP
* Net::HTTP#open_timeout のデフォルト値が 60 になりました。(以前は nil でした)
* Net::Telnet
* Net::Telnet は net-telnet gem になりました... -
Thread
. handle _ interrupt(hash) { . . . } -> object (30.0) -
スレッドの割り込みのタイミングを引数で指定した内容に変更してブロックを 実行します。
...イミングを制御する例
th = Thread.new do
Thread.handle_interrupt(RuntimeError => :never) {
begin
# 安全にリソースの割り当てが可能
Thread.handle_interrupt(RuntimeError => :immediate) {
# ...
}
ensure
# 安全にリ......RuntimeError を無視(延期)している間はリソースの割り当てや ensure
節でリソースの解放を安全に行う事ができます。
==== TimeoutError 対策
例:TimeoutError 発生のタイミングを制御する例
require 'timeout'
Thread.handle_interrupt(TimeoutErro......=> :never) {
timeout(10){
# TimeoutError => :never の指定により、ここでは TimeoutError が発生しない。
Thread.handle_interrupt(TimeoutError => :on_blocking) {
# :on_blocking な処理は TimeoutError が発生し得る。
}
# TimeoutError => :nev... -
NEWS for Ruby 3
. 0 . 0 (18.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ken by the same definition in an
ancestor class/module, a RuntimeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class variable from the toplevel scope is now a RuntimeError.
14541
* Assigning to a numbered parameter is now a S......eadable, IO#wait_writable, IO#read, IO#write and other related methods (e.g. IO#puts, IO#gets) may invoke the scheduler hook `#io_wait(io, events, timeout)` in a non-blocking execution context. 16786
* Kernel
* Kernel#clone when called with the `freeze: false` keyword will call `#initialize_cl......dependency and performance reasons.
* Set#join is added as a shorthand for `.to_a.join`.
* Set#<=> is added.
* Socket
* Add :connect_timeout to TCPSocket.new 17187
* Net::HTTP
* Net::HTTP#verify_hostname= and Net::HTTP#verify_hostname have been added to skip hostname verification...