Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/async_channels/src/mod.ts

Inspired by Go & Clojure Channels, async_channels provides channels as an asynchronous communication method between asynchronous functions.
Latest
import * as asyncChannels from "https://deno.land/x/async_channels@v1.0.0-rc8/src/mod.ts";

Classes

The Error class used when get or send are aborted before completion.

The Error class used when an invalid transition is performed.

The Error class used when the send transition is performed on a closed channel.

A Ticker holds a channel that delivers “ticks” of a clock at intervals.

Variables

after waits for the duration to elapse and then sends the current time on the returned channel. It is equivalent to (new Timer(d)).c. If efficiency is a concern, use new Timer() instead and call Timer.stop if the timer is no longer needed.

tick is a convenience wrapper for new Ticker(d) providing access to the ticking channel only. While tick is useful for clients that have no need to shut down the Ticker, be aware that without a way to shut it down the underlying Ticker cannot be recovered by the garbage collector; it "leaks".

timeout creates a channel that will close after duration milliseconds.

Interfaces

Extra options for new channels.

Options for pipe operations.

Extra options used for the select function.