From 222889bf5182c0564dab1674962a38c2f3847216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Sat, 22 Jun 2019 18:06:22 +0800 Subject: [PATCH] Upgrade pool --- zh/pool.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/zh/pool.md b/zh/pool.md index 2b4bfe12d..b004c8e93 100644 --- a/zh/pool.md +++ b/zh/pool.md @@ -39,6 +39,8 @@ class MyConnectionPool extends Pool 这里框架提供了一个非常简单的连接池实现。 ```php +get(PoolFactory::class); $pool = $factory->get('your pool name', function () use ($host, $port, $ssl) { return new Client($host, $port, $ssl); -}, $this->option); +}, [ + 'max_connections' => 50 +]); $connection = $pool->get(); $client = $connection->getConnection(); // 即上述 Client. + +// Do somethind. + +$connection->release(); + ``` \ No newline at end of file