makeChannel
function makeChannel<T = any>(bufferType?: CreatableBufferType, capacity?: number, id?: string): Channel<T>
Last updated
function makeChannel<T = any>(bufferType?: CreatableBufferType, capacity?: number, id?: string): Channel<T>
Last updated
Default buffer type is Fixed and default capacity is 1.
The first argument is the . The second argument is capacity of our channel i.e how many values it can hold before buffer logic comes into play. The last argument is id and by default this will be a uuid v4 string, but you can specify a custom id for debugging purposes.
This is either an auto generated uuid string or id passed to makeChannel function
The name is self-explanatory. This flag indicates whether the channel is closed or not. Closed channel does not contain any values and cannot be supplied with new ones.
Indicates whether the channel will block the operations which want to insert a new value into it. Is a proxy for underlying buffer's isBlocked
property.
Maximum number of items the channel can hold before internal buffer behavior comes into play.
Is method used to compare two channels for equality based on their ids.
Every channel in this library is