raindrops.rb

Path: lib/raindrops.rb  (CVS)
Last Update: Tue Feb 07 17:14:32 +0000 2012

Each Raindrops object is a container that holds several counters. It is internally a page-aligned, shared memory area that allows atomic increments, decrements, assignments and reads without any locking.

  rd = Raindrops.new 4
  rd.incr(0, 1)   -> 1
  rd.to_ary       -> [ 1, 0, 0, 0 ]

Unlike many classes in this package, the core Raindrops class is intended to be portable to all reasonably modern *nix systems supporting mmap(). Please let us know if you have portability issues, patches or pull requests at raindrops@librelist.org

Required files

raindrops_ext   raindrops/middleware/proxy  

[Validate]