mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15: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;
|
private Pool $_pool;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Pool $pool
|
?Pool $pool = null
|
||||||
) {
|
) {
|
||||||
// Use shared memory pool for async operations
|
// Use shared memory pool for async operations
|
||||||
$this->_pool = $pool;
|
$this->_pool = $pool ? $pool : new Pool;
|
||||||
|
|
||||||
// Set defaults
|
// Set defaults
|
||||||
$this->_pool->set(
|
$this->_pool->set(
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ use \Yggverse\Yoda\Interface\Model\Pool;
|
||||||
interface Connection
|
interface Connection
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Pool $pool
|
?Pool $pool = null
|
||||||
);
|
);
|
||||||
|
|
||||||
public function request(
|
public function request(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue