about summary refs log tree commit homepage
path: root/lib/raindrops.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/raindrops.rb')
-rw-r--r--lib/raindrops.rb15
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