るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.075秒)
トップページ > バージョン:2.6.0[x] > クエリ:on[x] > クエリ:d[x] > クエリ:Thread[x] > 種類:モジュール[x]

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. socket udp_server_loop_on
  5. thread abort_on_exception

ライブラリ

検索結果

MonitorMixin (18040.0)

スレッドの同期機構としてのモニター機能を提供するモジュールです。

...スレッドの同期機構としてのモニター機能を提供するモジュールです。

クラスに Module#include したり、オブジェクトに
Object#extend したりすることでそのクラス/オブジェクトに
モニタ機能を追加します。

=== 例

//emlist[消費...
...//emlist[extend する例][ruby]{
require 'monitor'
buf = []
buf.extend(MonitorMixin)
//}

しかし、MonitorMixin をクラス定義の際に Module#include を使って
利用する場合は、initialize メソッドで super() か super を呼んで、初期化する必要があります。...