qqq
This commit is contained in:
@@ -52,6 +52,9 @@ class PoolItem
|
|||||||
*/
|
*/
|
||||||
public function push(mixed $item): void
|
public function push(mixed $item): void
|
||||||
{
|
{
|
||||||
|
if (is_null($item)) {
|
||||||
|
$item = call_user_func($this->callback);
|
||||||
|
}
|
||||||
$this->_items->push($item);
|
$this->_items->push($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,7 +112,7 @@ class PoolItem
|
|||||||
if ($this->_items->isEmpty()) {
|
if ($this->_items->isEmpty()) {
|
||||||
return call_user_func($this->callback);
|
return call_user_func($this->callback);
|
||||||
} else {
|
} else {
|
||||||
return $this->_items->pop();
|
return $this->_items->pop($waite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user