make pool argument optional

This commit is contained in:
yggverse 2024-07-16 23:15:49 +03:00
parent f05db4b291
commit 1d2641dceb
2 changed files with 3 additions and 3 deletions

View file

@ -11,10 +11,10 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
private Pool $_pool;
public function __construct(
Pool $pool
?Pool $pool = null
) {
// Use shared memory pool for async operations
$this->_pool = $pool;
$this->_pool = $pool ? $pool : new Pool;
// Set defaults
$this->_pool->set(

View file

@ -13,7 +13,7 @@ use \Yggverse\Yoda\Interface\Model\Pool;
interface Connection
{
public function __construct(
Pool $pool
?Pool $pool = null
);
public function request(