| Class | DRb::TimerIdConv::TimerHolder2 |
| In: |
drb/timeridconv.rb
|
| Parent: | Object |
# File drb/timeridconv.rb, line 11 def initialize(timeout=600) super() @sentinel = Object.new @gc = {} @curr = {} @renew = {} @timeout = timeout @keeper = keeper end
# File drb/timeridconv.rb, line 21 def add(obj) synchronize do key = obj.__id__ @curr[key] = obj return key end end
# File drb/timeridconv.rb, line 29 def fetch(key, dv=@sentinel) synchronize do obj = peek(key) if obj == @sentinel return dv unless dv == @sentinel raise InvalidIndexError end @renew[key] = obj # KeepIt return obj end end
ruby-doc.org is hosted and maintained by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.
Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.
For more information on the Ruby programming language, visit ruby-lang.org.
Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.