From 3169505e074ef0d0113594626702a728e3e11a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 3 Nov 2021 14:48:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-server/ApplicationStore.php | 95 -------------------------------- kiri-engine/Application.php | 4 -- 2 files changed, 99 deletions(-) delete mode 100644 http-server/ApplicationStore.php diff --git a/http-server/ApplicationStore.php b/http-server/ApplicationStore.php deleted file mode 100644 index c1117099..00000000 --- a/http-server/ApplicationStore.php +++ /dev/null @@ -1,95 +0,0 @@ -lock = new Channel(1); - } - - - /** - * @return ApplicationStore|null - */ - public static function getStore(): ?ApplicationStore - { - if (!(static::$applicationStore instanceof ApplicationStore)) { - static::$applicationStore = new ApplicationStore(); - } - return static::$applicationStore; - } - - - /** - * @return $this - */ - public function instance(): static - { - return $this; - } - - - /** - * - */ - public function waite(): void - { - if ($this->lock->errCode == SWOOLE_CHANNEL_CLOSED) { - return; - } - $this->lock->pop(-1); - } - - - public function close() - { - $this->lock->push(1); - $this->lock->close(); - } - - - /** - * - */ - public function done(): void - { - $this->lock->pop(); - } - - - /** - * @return bool - */ - public function isBusy(): bool - { - return !$this->lock->isEmpty(); - } - - - /** - * @return string - */ - #[Pure] public function getStatus(): string - { - return env('state','start'); - } - -} diff --git a/kiri-engine/Application.php b/kiri-engine/Application.php index 91a278c0..ab619139 100644 --- a/kiri-engine/Application.php +++ b/kiri-engine/Application.php @@ -88,10 +88,6 @@ class Application extends BaseApplication */ public function addProcess(string $class, Process $process) { - if (!isset($this->_process[$class])) { - $this->_process[$class] = []; - } - $this->_process[$class][] = $process; }