種類
- インスタンスメソッド (60)
- 文書 (27)
クラス
- IO (33)
- Monitor (5)
-
MonitorMixin
:: ConditionVariable (11) -
Thread
:: ConditionVariable (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) -
wait
_ for _ cond (5) -
wait
_ readable (11) -
wait
_ writable (11)
検索結果
先頭5件
-
MonitorMixin
:: ConditionVariable # wait(timeout = nil) -> bool (18344.0) -
モニタのロックを開放し、現在のスレッドを停止します。
...ionVariable#signal や
MonitorMixin::ConditionVariable#broadcast
で起こされるまでスレッドは停止し続けます。
timeout を与えた場合は最大 timeout 秒まで停止した後にスレッドを
再開します。
実行を再開したスレッドはモニタのロックを保......スレッドはただ一つになり、排他を実現します。
true を返します。timeout が与えられていて待ち時間が timeout を
越えた場合は false を返します。
@param timeout タイムアウトまでの秒数。指定しなかった場合はタイムアウトし......ません。
@raise ThreadError ロックを持っていないスレッドがこのメソッドを呼びだした場合に発生します
@see MonitorMixin::ConditionVariable#wait_while, MonitorMixin::ConditionVariable#wait_until... -
IO
# wait(timeout = nil) -> bool | self | nil (18322.0) -
self が読み込み可能になるまでブロックし、読み込み可能になったら 真値を返します。タイムアウト、もしくはEOFで それ以上読みこめない場合は偽の値を返します。
...い。
timeout を指定した場合は、指定秒数経過するまでブロックし、タ
イムアウトした場合は nil を返します。
self が EOF に達していれば false を返します。
@param timeout タイムアウトまでの秒数を指定します。
@see IO#wait_writ... -
Thread
:: ConditionVariable # wait(mutex , timeout = nil) -> self (18308.0) -
mutex のロックを解放し、カレントスレッドを停止します。 Thread::ConditionVariable#signalまたは、 Thread::ConditionVariable#broadcastで送られたシグナルを 受け取ると、mutexのロックを取得し、実行状態となります。
...と、mutexのロックを取得し、実行状態となります。
@param mutex Thread::Mutex オブジェクトを指定します。
@param timeout スリープする秒数を指定します。この場合はシグナルを受け取
らなかった場合でも指定した秒数......け取ると、mutexのロックを取得し、実行状態となります。
@param mutex Mutex オブジェクトを指定します。
@param timeout スリープする秒数を指定します。この場合はシグナルを受け取
らなかった場合でも指定した秒数... -
IO
# wait _ readable(timeout = nil) -> bool | self | nil (6322.0) -
self が読み込み可能になるまでブロックし、読み込み可能になったら 真値を返します。タイムアウト、もしくはEOFで それ以上読みこめない場合は偽の値を返します。
...い。
timeout を指定した場合は、指定秒数経過するまでブロックし、タ
イムアウトした場合は nil を返します。
self が EOF に達していれば false を返します。
@param timeout タイムアウトまでの秒数を指定します。
@see IO#wait_writ... -
IO
# wait _ writable(timeout) -> self | nil (6321.0) -
self が書き込み可能になるまでブロックし、書き込み可能になったら self を 返します。
...、書き込み可能になったら self を
返します。
timeout を指定した場合は、指定秒数経過するまでブロックし、タイムアウト
した場合は nil を返します。
@param timeout タイムアウトまでの秒数を指定します。
@see IO#wait_readable... -
Monitor
# wait _ for _ cond(cond , timeout) -> bool (6314.0) -
MonitorMixin::ConditionVariable 用の内部メソッドです。
...MonitorMixin::ConditionVariable 用の内部メソッドです。
@param cond Thread::ConditionVariable を指定します。
@param timeout タイムアウトまでの秒数。指定しなかった場合はタイムアウトしません。
@return タイムアウトしたときは false を返し......ます。それ以外は true を返します。
//emlist[例][ruby]{
require 'monitor'
m = Monitor.new
cv = Thread::ConditionVariable.new
m.enter
m.wait_for_cond(cv, 1)
//}... -
Monitor
# wait _ for _ cond(cond , timeout) -> true (6314.0) -
MonitorMixin::ConditionVariable 用の内部メソッドです。
...ram timeout タイムアウトまでの秒数。指定しなかった場合はタイムアウトしません。
@return Ruby 1.9 の頃からのバグで常に true を返します。(16608)
//emlist[例][ruby]{
require 'monitor'
m = Monitor.new
cv = Thread::ConditionVariable.new
m.enter
m.wait_fo... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (228.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...追加
: ((<Process/Process.abort>)) [new]
: ((<Process/Process.exit>)) [new]
追加。関数 abort, exit と同じ。
: ((<Process/Process.waitall>)) [new]
追加
: ((<Process::Status#pid|Process::Status/pid>)) [new]
追加
=== Range
: ((<Range#step|Range/step>)) [new]......します。
=== Time
: ((<Time#getgm|Time/getgm>)) [new]
: ((<Time#getlocal|Time/getlocal>)) [new]
: ((<Time#getutc|Time/getutc>)) [new]
: ((<Time#gmt_offset|Time/gmt_offset>)) [new]
: ((<Time#gmtoff|Time/gmtoff>)) [new]
: ((<Time#utc_offset|Time/utc_offset>)) [new]......)
: ((<Timeout/Timeout.timeout>)) [lib] [new]
: ((<Timeout::Error|Timeout/Error>)) [lib] [new]
timeout に Timeout モジュールが定義されました。((<RCR#121>))
関数 ((<timeout/timeout>)) は、モジュール関数 Timeout.timeout の別名に、
例外 ((<TimeoutError>)) は... -
NEWS for Ruby 3
. 1 . 0 (186.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...asure_total_time = true でGCの計測を有効にします。計測によってオーバーヘッドが発生する可能性があります。デフォルトで有効になっています。 GC.measure_total_time は現在の設定を返します。 GC.stat[:time] または GC.stat(:time) は、測......クなしの Timeout.timeout に timeout_after フックが導入されました。 17470
* 新しいSchedulerのフックのio_readとio_writeが導入され、zero-copy read/writeのための低レベルのIO::Bufferが導入されました。 18020
* IOフックのio_wait、io_read、......error_highlight 0.3.0
* etc 1.3.0
* fcntl 1.0.1
* fiddle 1.1.0
* fileutils 1.6.0
* find 0.1.1
* io-console 0.5.10
* io-wait 0.2.1
* ipaddr 1.2.3
* irb 1.4.1
* json 2.6.1
* logger 1.5.0
* net-http 0.2.0
* net-protocol 0.1.2
* nkf 0.1.1
* op... -
NEWS for Ruby 2
. 3 . 0 (54.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ンに --debug または --debug=frozen-string-literal を付けて実行すると、
freeze された文字列を操作しようとして RuntimeError が発生したときにそのオブジェクトが生成された位置を表示します。
11725
* safe navigation operator (ぼ......しません)
11695
* ログデバイスを開きなおすために Logger#reopen が追加されました。
11696
* io/wait
* IO#wait_readable は FIONREAD をチェックしなくなりました。
ソケットのようなバイトストリームではないIOで使......文字列のエンコーディングを設定すると予期しない動作の原因となるかもしれません。
11827
* timeout
* Object#timeoutは呼び出すと非推奨として警告されるようになりました。
=== 標準添付ライブラリの互換性 (機能追加... -
NEWS for Ruby 3
. 0 . 0 (48.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......argument will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352 17419
* ConditionVariable
* ConditionVariable#wait may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Dir
* Dir.glob and Dir.[] now sort the results by def......5822
* IO
* IO#nonblock? now defaults to `true`. 16786
* IO#wait_readable, 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#...