This commit is contained in:
2021-04-26 13:57:13 +08:00
parent d1e3a3017b
commit 76f9688ea6
3 changed files with 8 additions and 5 deletions
-4
View File
@@ -28,8 +28,6 @@ class Channel extends Component
*/
public function push(mixed $value, string $name = ''): void
{
unset($value);
return;
$channel = $this->channelInit($name);
$channel->enqueue($value);
}
@@ -75,8 +73,6 @@ class Channel extends Component
*/
public function pop(string $name, Closure $closure, int|float $timeout = null): mixed
{
return call_user_func($closure);
if (($channel = $this->channelInit($name)) == false) {
return $this->addError('Channel is full.');
}