# \PG\MSF\PoolsAsynPoolManager

Class AsynPoolManager

## Summary

Methods
Properties
Constants
__construct()
eventAdd()
noEventAdd()
getPipeMessage()
distribute()
registerAsyn()
writePipe()
sendMessageToWorker()
No public properties found
No constants found
No protected methods found
$swooleServer
$process
$registerDir
$notEventAdd
N/A
No private methods found
No private properties found
N/A

File
  Pools/AsynPoolManager.php
Package
  MSF\Pools
Class hierarchy
  \PG\MSF\Pools\AsynPoolManager

## Tags

None found

## Properties

### $swooleServer

    $swooleServer : \PG\MSF\MSFServer

#### Type

\PG\MSF\MSFServer — server运行实例

#

## Tags

None found

### $process

    $process : \swoole_process

#### Type

\swoole_process — 连接池进程

#

## Tags

None found

### $registerDir

    $registerDir : array

#### Type

array — 已注册连接池

#

## Tags

None found

### $notEventAdd

    $notEventAdd : boolean

#### Type

boolean — 采用进程通讯，默认每个进程都启用进程池

#

## Tags

None found

## Methods

### __construct()

    __construct(\swoole_process  $process, \PG\MSF\MSFServer  $swooleServer)

AsynPoolManager constructor.

#### Parameters

\swoole_process | $process | 进程对象
\PG\MSF\MSFServer | $swooleServer | Server运行实例

#

## Tags

None found

### eventAdd()

    eventAdd() : $this

采用额外进程的方式

#### Returns

$this

#

## Tags

None found

### noEventAdd()

    noEventAdd() : $this

不采用进程通讯，每个进程都启用进程池

#### Returns

$this

#

## Tags

None found

### getPipeMessage()

    getPipeMessage(integer  $pipe) : $this

算是管道消息

#### Parameters

integer | $pipe | 管道文件描述符号

#### Returns

$this

#

## Tags

None found

### distribute()

    distribute(array  $data) : $this

分发消息

#### Parameters

array | $data | 待分发数据

#### Returns

$this

#

## Tags

None found

### registerAsyn()

    registerAsyn(\PG\MSF\Pools\IAsynPool  $asyn) : $this

注册异步连接池

#### Parameters

\PG\MSF\Pools\IAsynPool | $asyn | 连接池对象

#### Returns

$this

#

## Tags

None found

### writePipe()

    writePipe(\PG\MSF\Pools\IAsynPool  $asyn, mixed  $data, integer  $workerId) : $this

写入管道

#### Parameters

\PG\MSF\Pools\IAsynPool | $asyn | 连接池对象
mixed | $data | 写入数据
integer | $workerId | worker进程ID

#### Returns

$this

#

## Tags

None found

### sendMessageToWorker()

    sendMessageToWorker(\PG\MSF\Pools\IAsynPool  $asyn, mixed  $data) : $this

分发消息给worker

#### Parameters

\PG\MSF\Pools\IAsynPool | $asyn | 连接池对象
mixed | $data | 待分发数据

#### Returns

$this

#

## Tags

None found

### AsynPoolManager.php