Skip to content

Commit 561f555

Browse files
committed
Merge pull request danmar#451 from lanurmi/childs-children
Fix plural of "child" -- it is not "childs" but "children".
2 parents 7c7fcf3 + c6d9e2b commit 561f555

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

cli/threadexecutor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ int ThreadExecutor::handleRead(int rpipe, unsigned int &result)
141141
return 1;
142142
}
143143

144-
bool ThreadExecutor::checkLoadAverage(size_t nchilds)
144+
bool ThreadExecutor::checkLoadAverage(size_t nchildren)
145145
{
146146
#ifdef __CYGWIN__ // getloadavg() is unsupported on Cygwin.
147147
return true;
148148
#else
149-
if (!nchilds || !_settings._loadAverage) {
149+
if (!nchildren || !_settings._loadAverage) {
150150
return true;
151151
}
152152

@@ -178,8 +178,8 @@ unsigned int ThreadExecutor::check()
178178
std::map<std::string, std::size_t>::const_iterator i = _files.begin();
179179
for (;;) {
180180
// Start a new child
181-
size_t nchilds = rpipes.size();
182-
if (i != _files.end() && nchilds < _settings._jobs && checkLoadAverage(nchilds)) {
181+
size_t nchildren = rpipes.size();
182+
if (i != _files.end() && nchildren < _settings._jobs && checkLoadAverage(nchildren)) {
183183
int pipes[2];
184184
if (pipe(pipes) == -1) {
185185
std::cerr << "pipe() failed: "<< std::strerror(errno) << std::endl;

cli/threadexecutor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ class ThreadExecutor : public ErrorLogger {
8989

9090
/**
9191
* @brief Check load average condition
92-
* @param nchilds - count of currently runned childs
92+
* @param nchildren - count of currently runned children
9393
* @return true - if new process can be started
9494
*/
95-
bool checkLoadAverage(size_t nchilds);
95+
bool checkLoadAverage(size_t nchildren);
9696

9797
public:
9898
/**

0 commit comments

Comments
 (0)