MCPcopy Create free account
hub / github.com/cutelyst/cutelyst / createProcess

Method createProcess

Cutelyst/Server/unixfork.cpp:131–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131bool UnixFork::createProcess(bool respawn)
132{
133 if (respawn) {
134 m_recreateWorker.removeIf([this, respawn](Worker worker) {
135 worker.restart = 0;
136 if (!createChild(worker, respawn)) {
137 std::cout << "CHEAPING worker: " << worker.id << '\n';
138 --m_processes;
139 }
140
141 return true; // Clean recreate worker list
142 });
143 } else {
144 for (int i = 0; i < m_processes; ++i) {
145 Worker worker;
146 worker.id = i + 1;
147 worker.null = false;
148 createChild(worker, respawn);
149 }
150 }
151
152 return !m_childs.empty();
153}
154
155void UnixFork::decreaseWorkerRespawn()
156{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected