mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
make pool argument optional
This commit is contained in:
parent
f05db4b291
commit
1d2641dceb
2 changed files with 3 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use \Yggverse\Yoda\Interface\Model\Pool;
|
|||
interface Connection
|
||||
{
|
||||
public function __construct(
|
||||
Pool $pool
|
||||
?Pool $pool = null
|
||||
);
|
||||
|
||||
public function request(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue