From a24b134d20fecfb34bd17562bda7f0ea1dcfd07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 20 Feb 2021 15:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Kafka/Kafka.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Kafka/Kafka.php b/Kafka/Kafka.php index 76d7a666..b844f59f 100644 --- a/Kafka/Kafka.php +++ b/Kafka/Kafka.php @@ -30,6 +30,8 @@ class Kafka extends \Snowflake\Process\Process protected Channel $channel; + private int $maxLength = 5000; + /** * @param Process $process @@ -103,10 +105,10 @@ class Kafka extends \Snowflake\Process\Process */ public function channelListener() { - $this->channel = new Channel(100); + $this->channel = new Channel($this->maxLength); Coroutine::create(function () { $group = new WaitGroup(); - for ($i = 0; $i < 100; $i++) { + for ($i = 0; $i < $this->maxLength; $i++) { $group->add(); go(function () use ($group) { defer(function () use ($group) {