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 timed out.
Details
at line 16
bool
push(mixed $data, float $timeout = -1)
No description
at line 22
mixed
pop(float $timeout = -1)
No description
at line 32
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 37
int
getCapacity()
Get the channel capacity.
at line 42
int
getLength()
Get the number of queued values.
at line 47
bool
isAvailable()
Determine whether the channel is available.
at line 52
bool
hasProducers()
Determine whether producers are waiting.
at line 57
bool
hasConsumers()
Determine whether consumers are waiting.
at line 62
bool
isEmpty()
Determine whether the channel is empty.
at line 67
bool
isFull()
Determine whether the channel is full.
at line 72
bool
isReadable()
Determine whether the channel is readable.
at line 77
bool
isWritable()
Determine whether the channel is writable.
at line 82
bool
isClosing()
Determine whether the channel is closing or closed.
at line 87
bool
isTimeout()
Determine whether the last operation timed out.