]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/stub_HelperChildConfig.cc
60761e00811d7e09a0b041fe4315c5f0ba39fc93
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
11 #include "helper/ChildConfig.h"
13 #define STUB_API "stub_HelperChildconfig.cc"
14 #include "tests/STUB.h"
18 Helper::ChildConfig::ChildConfig():
26 defaultQueueSize(true)
29 Helper::ChildConfig::ChildConfig(const unsigned int m
):
37 defaultQueueSize(true)
41 Helper::ChildConfig::needNew() const
43 /* during the startup and reconfigure use our special amount... */
44 if (starting_up
|| reconfiguring
) return n_startup
;
46 /* keep a minimum of n_idle helpers free... */
47 if ( (n_active
+ n_idle
) < n_max
) return n_idle
;
49 /* dont ever start more than n_max processes. */
50 return (n_max
- n_active
);
53 void Helper::ChildConfig::parseConfig() STUB