about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-04-13 01:11:29 +0000
committerEric Wong <normalperson@yhbt.net>2011-04-13 01:11:29 +0000
commit2d1a4fbe37ebb0f229edbaefd392bdd8b6865590 (patch)
tree08d9d6f93e3f3010c4c470c92ef0d1205056dc9f /lib
parent46cc05089ea34b823454f790092f386f22d3adb1 (diff)
downloadunicorn-2d1a4fbe37ebb0f229edbaefd392bdd8b6865590.tar.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/unicorn/worker.rb19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/unicorn/worker.rb b/lib/unicorn/worker.rb
index fd8d20e..39e9e32 100644
--- a/lib/unicorn/worker.rb
+++ b/lib/unicorn/worker.rb
@@ -2,16 +2,23 @@
 
 # This class and its members can be considered a stable interface
 # and will not change in a backwards-incompatible fashion between
-# releases of Unicorn.  You may need to access it in the
-# before_fork/after_fork hooks.  See the Unicorn::Configurator RDoc
-# for examples.
+# releases of \Unicorn.  Knowledge of this class is generally not
+# not needed for most users of \Unicorn.
+#
+# Some users may want to access it in the before_fork/after_fork hooks.
+# See the Unicorn::Configurator RDoc for examples.
 class Unicorn::Worker < Struct.new(:nr, :tmp, :switched)
 
-  # worker objects may be compared to just plain numbers
-  def ==(other_nr)
-    self.nr == other_nr
+  # worker objects may be compared to just plain Integers
+  def ==(other_nr) # :nodoc:
+    nr == other_nr
   end
 
+  # In most cases, you should be using the Unicorn::Configurator#user
+  # directive instead.  This method should only be used if you need
+  # fine-grained control of exactly when you want to change permissions
+  # in your after_fork hooks.
+  #
   # Changes the worker process to the specified +user+ and +group+
   # This is only intended to be called from within the worker
   # process from the +after_fork+ hook.  This should be called in