task.close()
Closes a channel to future sends.
Signature
task.close(channel)
Parameters
Channel.
Returns
Boolean indicating whether it was open.
Behavior
Wakes waiters. Queued data can still be received.
Errors
Invalid channel.
Example
use task
q = task.channel()
task.close(q)
assert(not task.receive(q).open)