Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ TryPeek()

override bool System.Threading.Channels.BoundedChannel< T >.BoundedChannelReader.TryPeek ( [MaybeNullWhen(false)] out T item)
inlinevirtual

Reimplemented from System.Threading.Channels.ChannelReader< T >.

Definition at line 64 of file BoundedChannel.cs.

65 {
67 lock (parent.SyncObj)
68 {
69 if (!parent._items.IsEmpty)
70 {
71 item = parent._items.PeekHead();
72 return true;
73 }
74 }
75 item = default(T);
76 return false;
77 }

References System.Threading.Channels.BoundedChannel< T >.BoundedChannelReader._parent, and System.item.