import { Channel } from "https://deno.land/x/ayonli_jsext@v0.9.72/chan.ts";
Pushes data to the channel.
If there is a receiver, the data will be consumed immediately. Otherwise:
-
If this is an non-buffered channel, this function will block until a receiver is available and the data is consumed.
-
If this is a buffered channel, then:
- If the buffer size is within the capacity, the data will be pushed to the buffer.
- Otherwise, this function will block until there is new space for the data in the buffer.