Support setting "manager" for Plack::Handler::FCGI in single-process mode#535
Support setting "manager" for Plack::Handler::FCGI in single-process mode#535miyagawa merged 1 commit intoplack:masterfrom
Conversation
|
I'm not sure what this patch does which the current code doesn't? Can't you just create a ProcManager object on your own with whatever configuration and set it to manager? |
|
Problem is that the "manager" is not used in non-listen mode. The $proc_manager is only assigned and used when "listen" or $running_under_server_starter. |
|
It would be fine if "manager" object had to be constructed externally and passed in for single-process mode. Change would look like: |
|
Yeah that sounds more like a minimal change to make things that you want possible. |
4bd3810 to
2725e6f
Compare
|
I updated the pull request with a simpler version that allows passing "manager" object in the web server single-process mode. It does depend on the caller constructing the FCGI::ProcManager with n_processes => 0. It doesn't require changing the proc manager construction and defaults. |
Support setting "manager" for Plack::Handler::FCGI in single-process mode
FCGI::ProcManager supports running in single-process mode when
n_processes is zero. It is useful (for harakiri support) to run
with proc manager in single-process mode.
This refactors _create_proc_manager method to create the manager
object. It uses different default manager class and number processes between
listen mode and single process mode. It keeps the old behavior for
single-process mode without manager. It would be possible to create proc manager by default or always.