From feed27e9a26ba939446149cc10fec6adbfcb8fff Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sun, 1 Sep 2024 22:47:07 -0500 Subject: [PATCH] Add getLimit() method --- src/Worker/DelegatingWorkerPool.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Worker/DelegatingWorkerPool.php b/src/Worker/DelegatingWorkerPool.php index abcedfd..33039ca 100644 --- a/src/Worker/DelegatingWorkerPool.php +++ b/src/Worker/DelegatingWorkerPool.php @@ -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());