Documentation

DefaultChannel
in package
implements ChannelInterface

Table of Contents

Interfaces

ChannelInterface

Methods

__construct()  : mixed
初始化通道
__destruct()  : mixed
摧毁通道
capacity()  : int
获取通道容量
close()  : void
关闭通道
isEmpty()  : bool
通道是否为空
isFull()  : bool
通道是否满
pop()  : mixed
获取一个数据
push()  : mixed
推送一个数据

Methods

__construct()

初始化通道

public __construct([int $capacity = -1 ]) : mixed
Parameters
$capacity : int = -1

初始容量

Tags
inheritdoc

__destruct()

摧毁通道

public __destruct() : mixed
Tags
inheritdoc

capacity()

获取通道容量

public capacity() : int
Tags
inheritdoc
Return values
int

isEmpty()

通道是否为空

public isEmpty() : bool
Tags
inheritdoc
Return values
bool

isFull()

通道是否满

public isFull() : bool
Tags
inheritdoc
Return values
bool

pop()

获取一个数据

public pop([int|float $timeout = -1 ]) : mixed
Parameters
$timeout : int|float = -1

单位:秒

Return values
mixed

false:通道关闭

push()

推送一个数据

public push(mixed $data[, int|float $timeout = -1 ]) : mixed
Parameters
$data : mixed
$timeout : int|float = -1

单位:秒

Tags
inheritdoc

        
On this page

Search results