diff --git a/Pool.php b/Pool.php index ba89ab0..c23cdf4 100644 --- a/Pool.php +++ b/Pool.php @@ -95,12 +95,13 @@ class Pool implements PoolInterface /** * @param string $name + * @param int $waite_time * @return array * @throws Exception */ - public function get(string $name): mixed + public function get(string $name, int $waite_time = 3): mixed { - return $this->channel($name)->pop(); + return $this->channel($name)->pop($waite_time); } diff --git a/PoolInterface.php b/PoolInterface.php index 8bd2970..206d520 100644 --- a/PoolInterface.php +++ b/PoolInterface.php @@ -17,9 +17,10 @@ interface PoolInterface /** * @param string $name + * @param int $waite_time * @return mixed */ - public function get(string $name): mixed; + public function get(string $name, int $waite_time): mixed; /**