Skip to main content
Module

x/async_channels/mod.ts>Channel#close

Inspired by Go & Clojure Channels, async_channels provides channels as an asynchronous communication method between asynchronous functions.
Latest
method Channel.prototype.close
Re-export
import { Channel } from "https://deno.land/x/async_channels@v1.0.0-rc8/mod.ts";

Closes the channel.

Closing a closed channel have no effect (positive or negative).

Sending a message to a closed channel will throw an AbortedError.

Receiving a message from a closed channel will resolve the promise immediately. See Channel.get for more information.