改名
This commit is contained in:
@@ -168,11 +168,11 @@ 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->_items[$name]->length() < 1) {
|
||||||
if (!$this->hasItem($name)) {
|
|
||||||
return $this->createByCallback($name, $callback);
|
return $this->createByCallback($name, $callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$time = microtime(true);
|
||||||
$connection = $this->_items[$name]->pop(0.01);
|
$connection = $this->_items[$name]->pop(0.01);
|
||||||
if (microtime(true) - $time >= 0.007) {
|
if (microtime(true) - $time >= 0.007) {
|
||||||
$this->warning('Worker #' . env('worker') . ' get client use time ' . (microtime(true) - $time));
|
$this->warning('Worker #' . env('worker') . ' get client use time ' . (microtime(true) - $time));
|
||||||
|
|||||||
Reference in New Issue
Block a user