改名
This commit is contained in:
@@ -20,8 +20,6 @@ abstract class Pool extends Component
|
|||||||
|
|
||||||
protected $max = 60;
|
protected $max = 60;
|
||||||
|
|
||||||
private $is_ticker = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $name
|
* @param $name
|
||||||
* @param false $isMaster
|
* @param false $isMaster
|
||||||
@@ -46,9 +44,6 @@ abstract class Pool extends Component
|
|||||||
*/
|
*/
|
||||||
protected function get($name, $timeout = -1)
|
protected function get($name, $timeout = -1)
|
||||||
{
|
{
|
||||||
if ($this->is_ticker) {
|
|
||||||
Coroutine::sleep(1);
|
|
||||||
}
|
|
||||||
if ($timeout != -1) {
|
if ($timeout != -1) {
|
||||||
$client = $this->_items[$name]->pop($timeout);
|
$client = $this->_items[$name]->pop($timeout);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class Connection extends Pool
|
|||||||
$this->info('client has :' . $this->size($coroutineName));
|
$this->info('client has :' . $this->size($coroutineName));
|
||||||
[$time, $client] = $this->get($coroutineName, -1);
|
[$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) {
|
if ($client instanceof PDO) {
|
||||||
return $this->saveClient($coroutineName, $client);
|
return $this->saveClient($coroutineName, $client);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user