Trait Yiisoft\Queue\Cli\SoftLimitTrait
| Implemented by | Yiisoft\ |
|---|
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| getMemoryLimit() | Yiisoft\ |
|
| memoryLimitReached() | Yiisoft\ |
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;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.