Function Receiver.ReceiveNoBlock

ReceiveNoBlock (bool blockedBefore, out T item)

Receives the next item from the channel, this call will not block.

Public
PopState ReceiveNoBlock (

bool

blockedBefore

out T

item

)

Receives the next item from the channel, this call will not block.

To ensure a consistent state, the caller must follow this pattern. 1. Call ReceiveNoBlock(false), if PopState.Wait is returned, wait for a bit (e.g yield return null in a Unity coroutine) 2. try again with PopNoBlock(true), if PopState.Wait, wait for a bit 3. Repeat from step 2.