class NBChannel(T)

Defined in:

nbchannel.cr

Constant Summary

VERSION = "0.1.0"

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def receive? : T | Nil #
Description copied from class Channel(T)

Receives a value from the channel. If there is a value waiting, it is returned immediately. Otherwise, this method blocks until a value is sent to the channel.

Returns nil if the channel is closed or closes while waiting for receive.


[View source]