SwooleChannel
in package
implements
Channel
FinalYes
Coroutine-aware bounded channel. `pop()` suspends the current coroutine until either an item is pushed or the timeout elapses.
Tags
Table of Contents
Interfaces
Methods
- __construct() : mixed
- close() : void
- isClosed() : bool
- pop() : T|null
- push() : bool
- size() : int
Methods
__construct()
public
__construct(int $capacity) : mixed
Parameters
- $capacity : int
close()
public
close() : void
isClosed()
public
isClosed() : bool
Return values
boolpop()
public
pop(Duration $timeout) : T|null
Parameters
- $timeout : Duration
Return values
T|nullpush()
public
push(object $item) : bool
Parameters
- $item : object
Return values
boolsize()
public
size() : int