改名
This commit is contained in:
@@ -168,10 +168,14 @@ abstract class Pool extends Component
|
|||||||
if (!Context::inCoroutine()) {
|
if (!Context::inCoroutine()) {
|
||||||
return $this->createClient($name, $callback);
|
return $this->createClient($name, $callback);
|
||||||
}
|
}
|
||||||
|
$time = microtime(true);
|
||||||
if (!$this->hasItem($name)) {
|
if (!$this->hasItem($name)) {
|
||||||
$this->createByCallback($name, $callback);
|
$this->createByCallback($name, $callback);
|
||||||
}
|
}
|
||||||
$connection = $this->_items[$name]->pop(0.01);
|
$connection = $this->_items[$name]->pop(0.01);
|
||||||
|
if (microtime(true) - $time >= 0.007) {
|
||||||
|
$this->warning('get client use time ' . (microtime(true) - $time));
|
||||||
|
}
|
||||||
if (!$this->checkCanUse($name, $connection)) {
|
if (!$this->checkCanUse($name, $connection)) {
|
||||||
return $this->createClient($name, $callback);
|
return $this->createClient($name, $callback);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user