/** * [onStart 协程调度器单例模式] * @param \swoole_server $server * @param $workerId */ public function onStart(\swoole_server $server, $workerId) { /* 设置只读模式的配置对象 */ $this->di = Loader::import(APP_CONF_PATH . '/service.php'); $this->app = Application::getInstance(); }