Signature: Channel(capacity: int) -> Channel

Description: Creates a new channel with the specified capacity.

Parameters #

  • capacity (int): The capacity of the channel

Returns: Channel

Example #

let ch = Channel(10)