Skip to content

Commit

Permalink
Add getLimit() method
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Sep 2, 2024
1 parent 7f8ca54 commit feed27e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Worker/DelegatingWorkerPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ public function getWorker(): Worker
return new PooledWorker($this->selectWorker(), $this->push(...));
}

public function getLimit(): int
{
return $this->limit;
}

public function getWorkerCount(): int
{
return \min($this->limit, $this->pool->getWorkerCount());
Expand Down

0 comments on commit feed27e

Please sign in to comment.