From 4b014193c920498e00c8eec371474142d9a8dbe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 4 Sep 2020 19:18:35 +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 --- System/Abstracts/Pool.php | 5 ----- System/Pool/Connection.php | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index 2a5da9f5..c20b8be6 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -20,8 +20,6 @@ abstract class Pool extends Component protected $max = 60; - private $is_ticker = false; - /** * @param $name * @param false $isMaster @@ -46,9 +44,6 @@ abstract class Pool extends Component */ protected function get($name, $timeout = -1) { - if ($this->is_ticker) { - Coroutine::sleep(1); - } if ($timeout != -1) { $client = $this->_items[$name]->pop($timeout); } else { diff --git a/System/Pool/Connection.php b/System/Pool/Connection.php index c5c70627..f5d1ebbd 100644 --- a/System/Pool/Connection.php +++ b/System/Pool/Connection.php @@ -189,7 +189,7 @@ class Connection extends Pool $this->info('client has :' . $this->size($coroutineName)); [$time, $client] = $this->get($coroutineName, -1); - $this->info('client has create :' . ($this->hasCreate[$coroutineName] ?? 0)); + $this->info('client has create :' . ($this->hasCreate[$coroutineName] ?? 0) . ':' . $this->max); if ($client instanceof PDO) { return $this->saveClient($coroutineName, $client); }