Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: bool TryRead(out T)

  • Declared in: RT.KitchenSink.Channel<T>

Declaration

public bool TryRead(
    out T result
)

Summary

Determines whether an element can be read from the channel and if so, reads it. If no element is waiting to be read, blocks until an element is received or the channel is closed.

Parameters

out Tresult Receives the element read from the channel (or default(T) if the end of the channel is reached).

Returns

true if an element has been read from the channel; false if the end of the channel is reached.

Remarks

If multiple threads call this method to wait for elements, each element is received by only one thread.