Nexus API Reference

FiberChannel
in package
implements Channel

FinalYes

Non-blocking, single-fiber channel backed by SplQueue. `pop()` ignores the timeout — under FiberRuntime PDO will block the fiber anyway, so adding a coroutine-style suspend here is pointless.

Tags
template

T of object

template-implements

Channel<T>

psalm-api

Table of Contents

Interfaces

Channel

Methods

__construct()  : mixed
close()  : void
isClosed()  : bool
pop()  : T|null
push()  : bool
size()  : int

Methods

__construct()

public __construct(int $capacity) : mixed
Parameters
$capacity : int

push()

public push(object $item) : bool
Parameters
$item : object
Return values
bool

        
On this page

Search results