update to 2.4.3 version (build 403)

add config: swoole.max_wait_time (default 5)
add constant MAIN_WORKER
add getExpireTS() for LightCache
fix savePersistence() bug
add zm_go() to prevent errors
This commit is contained in:
jerry
2021-03-29 15:34:24 +08:00
parent 202c8aee77
commit 6b872c6f74
32 changed files with 1280 additions and 882 deletions

View File

@@ -27,15 +27,13 @@ class ZMUtil
Process::kill(zm_atomic("_#worker_" . $i)->get(), SIGUSR1);
}
server()->shutdown();
server()->stop();
}
/**
* @throws Exception
*/
public static function reload() {
zm_atomic("_int_is_reload")->set(1);
system("kill -INT " . intval(server()->master_pid));
Process::kill(server()->master_pid, SIGUSR1);
}
public static function getModInstance($class) {
@@ -47,11 +45,6 @@ class ZMUtil
}
}
public static function sendActionToWorker($target_id, $action, $data) {
Console::verbose($action . ": " . $data);
server()->sendMessage(json_encode(["action" => $action, "data" => $data]), $target_id);
}
/**
* 在工作进程中返回可以通过reload重新加载的php文件列表
* @return string[]|string[][]