るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.223秒)
トップページ > バージョン:2.4.0[x] > クエリ:E[x] > クエリ:i[x] > クラス:Rinda::TupleSpace[x] > クエリ:write[x]

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix det_e
  4. matrix rank_e
  5. open3 capture2e

ライブラリ

検索結果

Rinda::TupleSpace#write(tuple, sec = nil) -> Rinda::TupleEntry (90907.0)

tuple をタプルスペースに加えます。 tuple を管理するための Rinda::TupleEntry オブジェクトを返します。

tuple をタプルスペースに加えます。
tuple を管理するための Rinda::TupleEntry オブジェクトを返します。

sec で追加したタプルの有効期限を指定できます。
追加されてから sec 秒過ぎたタプルはタプルスペースから削除されます。
nil は無限を意味し、この場合にはタプルは経過時間によっては削除されません。

返り値の Rinda::TupleEntry オブジェクトを使ってタプルを明示的に
キャンセルしたり有効期限を変更したりできます。ただし、利用にはGCなどに
気を付ける必要があります。
詳しくはRinda::TupleEntry のエントリーを見てくださ...

Rinda::TupleSpace#notify(event, pattern, sec = nil) -> Rinda::NotifyTemplateEntry (27994.0)

event で指定した種類のイベントの監視を開始します。

...視対象となるタプルのパターン
@param sec 監視期間の長さ(秒数)

=== 例
require 'rinda/tuplespace'

tuplespace = Rinda::TupleSpace.new
observer = tuplespace.notify("write", ["xyz", nil, nil])
Therad.new do
observer.each{|event, tuple| p event, tuple }
end

t...