This commit is contained in:
as2252258@163.com
2021-05-02 00:14:08 +08:00
parent e0a96b8e5a
commit cd4aad83de
-2
View File
@@ -28,7 +28,6 @@ class Channel extends Component
*/ */
public function push(mixed $value, string $name = ''): void public function push(mixed $value, string $name = ''): void
{ {
return;
$channel = $this->channelInit($name); $channel = $this->channelInit($name);
$channel->enqueue($value); $channel->enqueue($value);
} }
@@ -74,7 +73,6 @@ class Channel extends Component
*/ */
public function pop(string $name, Closure $closure, int|float $timeout = null): mixed public function pop(string $name, Closure $closure, int|float $timeout = null): mixed
{ {
return call_user_func($closure);
if (($channel = $this->channelInit($name)) == false) { if (($channel = $this->channelInit($name)) == false) {
return $this->addError('Channel is full.'); return $this->addError('Channel is full.');
} }