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

x/easyts/channel.ts>Chan#close

js library written with ts, use select and chan like golang in js.
Latest
method Chan.prototype.close
import { Chan } from "https://deno.land/x/easyts@0.1.3/channel.ts";

Close the channel, after which the channel will not be able to write, all blocked reads and writes are returned, but the value that has been written to the channel is guaranteed to be fully read

Returns

boolean

Returns false if the channel has been closed, otherwise closes the channel and returns true