改名
This commit is contained in:
@@ -168,15 +168,16 @@ abstract class Pool extends Component
|
|||||||
if (!Context::inCoroutine()) {
|
if (!Context::inCoroutine()) {
|
||||||
return $this->createClient($name, $callback);
|
return $this->createClient($name, $callback);
|
||||||
}
|
}
|
||||||
// if ($this->_items[$name]->length() > 10) {
|
$channel = $this->_items[$name];
|
||||||
// $connection = $this->_items[$name]->pop();
|
if ($channel->isEmpty()) {
|
||||||
// if (!$this->checkCanUse($name, $connection)) {
|
return $this->createByCallback($name, $callback);
|
||||||
// return $this->createClient($name, $callback);
|
}
|
||||||
// } else {
|
$connection = $channel->pop(0.002);
|
||||||
// return $connection;
|
if (!$this->checkCanUse($name, $connection)) {
|
||||||
// }
|
return $this->createClient($name, $callback);
|
||||||
// }
|
} else {
|
||||||
return $this->createClient($name, $callback);
|
return $connection;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user