ChannelInterface
interface ChannelInterface
Methods
No description
No description
Close the channel.
Get the channel capacity.
Get the number of queued values.
Determine whether the channel is available.
Determine whether producers are waiting.
Determine whether consumers are waiting.
Determine whether the channel is empty.
Determine whether the channel is full.
Determine whether the channel is readable.
Determine whether the channel is writable.
Determine whether the channel is closing or closed.
Determine whether the last operation was canceled.
Determine whether the last operation timed out.
Details
at line 17
bool
push(mixed $data, float $timeout = -1)
No description
at line 24
mixed
pop(float $timeout = -1)
No description
at line 36
bool
close()
Close the channel.
Data in the channel can still be popped out after closing, but push will no longer succeed. Native-backed channels must be closed from a deterministic lifecycle path while the runtime is active, never from a destructor after native teardown.
at line 41
int
getCapacity()
Get the channel capacity.
at line 46
int
getLength()
Get the number of queued values.
at line 51
bool
isAvailable()
Determine whether the channel is available.
at line 56
bool
hasProducers()
Determine whether producers are waiting.
at line 61
bool
hasConsumers()
Determine whether consumers are waiting.
at line 66
bool
isEmpty()
Determine whether the channel is empty.
at line 71
bool
isFull()
Determine whether the channel is full.
at line 76
bool
isReadable()
Determine whether the channel is readable.
at line 81
bool
isWritable()
Determine whether the channel is writable.
at line 86
bool
isClosing()
Determine whether the channel is closing or closed.
at line 93
bool
isCanceled()
Determine whether the last operation was canceled.
This state must be inspected immediately after a failed operation.
at line 98
bool
isTimeout()
Determine whether the last operation timed out.