modify plugin name
This commit is contained in:
@@ -89,7 +89,9 @@ class Pool extends Component
|
||||
$lists = [];
|
||||
$count = $channel->length();
|
||||
while ($this->status->is(StatusEnum::EXIT) === false) {
|
||||
$pdo = $channel->pop();
|
||||
if (!(($pdo = $channel->pop()) instanceof PDO)) {
|
||||
break;
|
||||
}
|
||||
if ($pdo->check()) {
|
||||
$success += 1;
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ class PoolQueue implements QueueInterface
|
||||
*/
|
||||
public function __construct(public int $max)
|
||||
{
|
||||
// if (Context::inCoroutine()) {
|
||||
// $this->queue = new Channel($this->max);
|
||||
// } else {
|
||||
if (Context::inCoroutine()) {
|
||||
$this->queue = new Channel($this->max);
|
||||
} else {
|
||||
$this->queue = new SplQueue($this->max);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user