Trait Yiisoft\Queue\Cli\SoftLimitTrait
| Implemented by | Yiisoft\Queue\Cli\SignalLoop, Yiisoft\Queue\Cli\SimpleLoop |
|---|
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| getMemoryLimit() | Yiisoft\Queue\Cli\SoftLimitTrait | |
| memoryLimitReached() | Yiisoft\Queue\Cli\SoftLimitTrait |
Method Details
| protected boolean memoryLimitReached ( ) |
protected function memoryLimitReached(): bool
{
$limit = $this->getMemoryLimit();
if ($limit !== 0) {
$usage = memory_get_usage(true);
if ($usage >= $limit) {
return true;
}
}
return false;
}
Signup or Login in order to comment.