diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-03-10 10:51:38 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-03-10 11:04:53 +0000 |
commit | 61962b27a51031965cef70451d369b115868fb11 (patch) | |
tree | 6f65d228cf5a80ad31430bf03951f5ed198bdf10 /lib/raindrops.rb | |
parent | 8392f8186cd21f9190474bd6b5ac6ec58c7af96a (diff) | |
download | raindrops-61962b27a51031965cef70451d369b115868fb11.tar.gz |
Of course, RDoc doesn't know quantity vs quality :)
Diffstat (limited to 'lib/raindrops.rb')
-rw-r--r-- | lib/raindrops.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/raindrops.rb b/lib/raindrops.rb index 88d65f6..54760a6 100644 --- a/lib/raindrops.rb +++ b/lib/raindrops.rb @@ -1,9 +1,16 @@ # -*- encoding: binary -*- +# +# 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 ] +# class Raindrops - # Raindrops is currently at version 0.4.1 - VERSION = '0.4.1' - # Used to represent the number of +active+ and +queued+ sockets for # a single listen socket across all threads and processes on a # machine. @@ -18,7 +25,7 @@ class Raindrops # +queued+ connections is the number of un-accept()-ed sockets in the # queue of a given listen socket. # - # These stats are currently only available under Linux + # These stats are currently only available under \Linux class ListenStats < Struct.new(:active, :queued) # the sum of +active+ and +queued+ sockets |