改名
This commit is contained in:
+5
-3
@@ -37,6 +37,8 @@ class Channel extends Component
|
|||||||
if ($channel->isFull()) {
|
if ($channel->isFull()) {
|
||||||
return $this->addError('Channel is full.');
|
return $this->addError('Channel is full.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
return $channel->push($value);
|
return $channel->push($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,9 +100,9 @@ class Channel extends Component
|
|||||||
return $channel->pop();
|
return $channel->pop();
|
||||||
}
|
}
|
||||||
$data = null;
|
$data = null;
|
||||||
if ($timeout !== null) {
|
// if ($timeout !== null) {
|
||||||
$data = $channel->pop($timeout);
|
// $data = $channel->pop($timeout);
|
||||||
}
|
// }
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
$data = call_user_func($closure);
|
$data = call_user_func($closure);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user