qqq
This commit is contained in:
@@ -95,12 +95,13 @@ class Pool implements PoolInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
* @param int $waite_time
|
||||||
* @return array
|
* @return array
|
||||||
* @throws Exception
|
* @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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -17,9 +17,10 @@ interface PoolInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
* @param int $waite_time
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function get(string $name): mixed;
|
public function get(string $name, int $waite_time): mixed;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user