$register->add($register::onWorkerStart, function (\swoole_server $server, int $workerId) {
var_dump("worker:" . $workerId . "start");
});
Di::getInstance()->set("REDIS",Redis::getInstance());
$allNum = 10;
for ($i = 0 ;$i < $allNum;$iPP){
ServerManager::getInstance()->getSwooleServer()->addProcess((new Consumer("consumer_{$i}"))->getProcess());
}
what is the relationship between them
what is the relationship between onworkerstart and addprocess
when onworkerstart is enabled, 8 worker can be displayed
of which 4 worker_num and 4 task_worker_num
MAIN_SERVER.SETTING.worker_num = 4
MAIN_SERVER.SETTING.max_request = 5000
MAIN_SERVER.SETTING.task_worker_num = 4
what is the relationship between the added process and the worker?