变更
This commit is contained in:
@@ -186,6 +186,14 @@ class Connection extends Component
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function flush($coroutineName, $minNumber = 1) {
|
||||
$this->pool->flush($coroutineName, $minNumber);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $coroutineName
|
||||
* @return bool
|
||||
|
||||
@@ -41,12 +41,13 @@ class Pool extends Component
|
||||
|
||||
|
||||
/**
|
||||
* @param $channel
|
||||
* @param $name
|
||||
* @param $retain_number
|
||||
* @throws Exception
|
||||
*/
|
||||
public function flush($channel, $retain_number)
|
||||
public function flush($name, $retain_number)
|
||||
{
|
||||
$channel = $this->channel($name);
|
||||
$this->pop($channel, $retain_number);
|
||||
}
|
||||
|
||||
@@ -175,16 +176,13 @@ class Pool extends Component
|
||||
/**
|
||||
* @param $channel
|
||||
* @param $minx
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
* @return void
|
||||
*/
|
||||
protected function maxIdleQuantity($channel, $minx): mixed
|
||||
protected function maxIdleQuantity($channel, $minx): void
|
||||
{
|
||||
$connection = $channel->pop();
|
||||
if ($channel->length() > $minx) {
|
||||
$this->pop($channel, $minx);
|
||||
}
|
||||
return $connection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user