message: concurrent reload
diff: @@ -286,10 +286,25 @@ static int swManager_loop(swFactory *factory)
  sizeof(swWorker) * SwooleG.task_worker_num);
  reload_worker_num += SwooleG.task_worker_num;
  }
  - reload_worker_i = 0;
  +
  ManagerProcess.reload_all_worker = 0;
  + if (serv->reload_async)
  + {
  + for (i = 0; i < serv->worker_num; i++)
  + {
  + if (kill(reload_workers[i].pid, SIGTERM) < 0)
  + {
  + swSysError("kill(%d, SIGTERM) [%d] failed.", reload_workers[i].pid, i);
  + }
  + }
  + reload_worker_i = serv->worker_num;
  + }
  + else
  + {
  + reload_worker_i = 0;
  goto kill_worker;
  }
  + }
  //only reload task workers
  else if (ManagerProcess.reload_task_worker == 1)
  {
  @@ -316,13 +331,20 @@ static int swManager_loop(swFactory *factory)
  for (i = 0; i < serv->worker_num; i++)
  {
  //compare PID
  - if (pid != serv->workers[i].pid)
  + if (pid != reload_workers[i].pid)
  {
  continue;
  }
  - else
  - {
  +
  + //Check the process return code and signal
  swManager_check_exit_status(serv, i, pid, status);
  +
  + //no need to create a new process when enable reload_async
  + if (serv->reload_async)
  + {
  + break;
  + }
  +
  pid = 0;
  while (1)
  {
  @@ -339,7 +361,6 @@ static int swManager_loop(swFactory *factory)
  }
  }
  }
  - }
  swWorker *exit_worker;
  //task worker
  