From f3f43f1b6c3930525a892c8ce860f072184fe981 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 30 Sep 2009 13:41:28 -0700 Subject: RDoc for Unicorn::HttpServer::Worker I'd rather document and maintain a stable interface for the Worker class than to have to deal with potential (portability and security) issues with with supporting user privilege management right now. There's already an example of user/group-switching support in the after_fork() hook and the error handling involved may be different depending on the application and environment so I remain hesitant to add official support for it... --- lib/unicorn.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 4171d3f..86458ac 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -61,7 +61,13 @@ module Unicorn 0 => $0.dup, } + # 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. class Worker < Struct.new(:nr, :tmp) + # worker objects may be compared to just plain numbers def ==(other_nr) self.nr == other_nr -- cgit v1.2.3-24-ge0c7