modify
This commit is contained in:
+1
-3
@@ -76,9 +76,7 @@ class Channel extends Component
|
|||||||
*/
|
*/
|
||||||
public function pop(string $name, Closure $closure): mixed
|
public function pop(string $name, Closure $closure): mixed
|
||||||
{
|
{
|
||||||
if (($channel = $this->channelInit($name)) == false) {
|
$channel = $this->channelInit($name);
|
||||||
return $this->addError('Channel is full.');
|
|
||||||
}
|
|
||||||
if ($channel->isEmpty()) {
|
if ($channel->isEmpty()) {
|
||||||
return call_user_func($closure);
|
return call_user_func($closure);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user