Channel:peek

Returns a message from the Channel without popping it from the queue. If the Channel is empty, nil is returned. This can be useful to determine if the Channel is empty.

message = Channel:peek()

Arguments

None

Returns

NameTypeDescription
message*The message.

See also