# chan_pool **Repository Path**: vijay_0215/chan_pool ## Basic Information - **Project Name**: chan_pool - **Description**: 利用swoole的chan建立池子,以供各工作进程复用 - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-12-03 - **Last Updated**: 2022-06-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # chan_pool ## 介绍 利用swoole的chan建立池子,以供各工作进程复用 ## 安装教程 ```shell script composer require dreamcat/chan_pool ``` ## 使用说明 示例代码如下 ```php setSize(10); $pool = new ChannelEntryPool($poolConfig); # 在需要的时候取出实体 $entry = $pool->get(); # 用完之后将其放回以便后续使用,不放回会导致后续无法使用 $pool->put($entry); ```