Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/channel/custom/channel/channel-impl.ts>ChannelImpl

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class ChannelImpl
implements [Channel.Read]<T>, [Channel.Write]<T>
import { ChannelImpl } from "https://deno.land/x/rimbu@1.0.2/channel/custom/channel/channel-impl.ts";

Constructors

new
ChannelImpl(options?: { capacity?: number | undefined; validator?: ((value: any) => boolean) | undefined; })

Properties

readonly
capacity: number
readonly
isClosed: boolean
readonly
isExhausted: boolean
readonly
length: number

Methods

close(): void
readable(): Channel.Read<T>
receive<RT>(options?: { signal?: AbortSignal | undefined; timeoutMs?: number | undefined; recover?: ((channelError: Channel.Error) => RT) | undefined; }): Promise<T | RT>
send(value: T, options?: { signal?: AbortSignal | undefined; timeoutMs?: number | undefined; catchChannelErrors?: boolean | undefined; }): Promise<any>
sendAll(source: AsyncStreamSource<T>, options?: { signal?: AbortSignal | undefined; timeoutMs?: number | undefined; catchChannelErrors?: boolean | undefined; }): Promise<any>
writable(): Channel.Write<T>
[Symbol.asyncIterator](): AsyncIterator<T>