buffered


Description:

public static Result<ChannelInt,Error> buffered (int capacity)

Creates a buffered channel with the given capacity.

Parameters:

capacity

buffer size (must be > 0).

Returns:

Result.ok(buffered ChannelInt), or Result.error(ChannelError.INVALID_ARGUMENT) when capacity is not positive.