GoLang Swoole\Channel::__construct

request it (279)
GoLang replacement for PHP's Swoole\Channel::__construct [edit | history]



Do you know a GoLang replacement for PHP's Swoole\Channel::__construct? Write it!

PHP Swoole\Channel::__construct

PHP original manual for Swoole\Channel::__construct [ show | php.net ]

Swoole\Channel::__construct

(PHP 5 >= 5.2.0, PHP 7, PECL swoole >= 1.9.0)

Swoole\Channel::__constructConstruct a Swoole Channel

Description

public Swoole\Channel::__construct ( string $size )

Swoole channel is memory data structure works like Chan in Golang, implemented based on shared memory and mutex locks. It can be used as high performance message queue in memory. Construct a swoole channel with a fixed size. The minimum size of a swoole channel is 64KB. Exceptions will be thrown if there is not enough memory.

Parameters

size

The size of the Swoole channel.