class LoggingChannel
- LoggingChannel
- Channel(UInt8)
- Reference
- Object
Defined in:
terminal.crInstance Method Summary
-
#receive
Receives a value from the channel.
Instance Method Detail
def receive
#
Description copied from class Channel(UInt8)
Receives a value from the channel. If there is a value waiting, then it is returned immediately. Otherwise, this method blocks until a value is sent to the channel.
Raises ClosedError if the channel is closed or closes while waiting for receive.
channel = Channel(Int32).new
spawn do
channel.send(1)
end
channel.receive # => 1