This commit is contained in:
2023-04-02 00:16:25 +08:00
parent 314bc98044
commit 8d27725583
2 changed files with 26 additions and 28 deletions
+2 -6
View File
@@ -155,13 +155,9 @@ class Pool extends Component
* @throws ConfigException
* @throws Exception
*/
public function get($name, $callback): mixed
public function get($name): mixed
{
$channel = $this->channel($name);
if ($channel->isEmpty()) {
$channel->push($callback());
}
return $channel->pop();
return $this->channel($name)->pop();
}