Click or drag to resize

EConcurrentQueueT Class

A simple thread-safe queue built on top of Queue{T}. Bug in .NET ConcurrentQueue; leaks when call TryPeek.
Inheritance Hierarchy
SystemObject
  NeoAxisEConcurrentQueueT

Namespace: NeoAxis
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.1.1.0 (2026.1.1.0)
Syntax
C#
public class EConcurrentQueue<T> : IEnumerable<T>, 
	IEnumerable

Type Parameters

T

The EConcurrentQueueT type exposes the following members.

Constructors
 NameDescription
Public methodEConcurrentQueueTInitializes a new instance of the EConcurrentQueueT class
Public methodEConcurrentQueueT(IEnumerableT)Initializes a new instance of the EConcurrentQueueT class
Public methodEConcurrentQueueT(Int32)Initializes a new instance of the EConcurrentQueueT class
Top
Properties
 NameDescription
Public propertyCount Gets the number of elements contained in the queue.
Top
Methods
 NameDescription
Public methodClear Removes all objects from the queue.
Public methodEnqueue Adds an element at the end of the queue.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetEnumerator Returns an enumerator for a snapshot of the queue. The snapshot is a copy of the current collection; it is safe to enumerate.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToArray Copies the elements to an array snapshot.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryDequeue Attempts to dequeue an element. Returns true if successful.
Public methodTryPeek Attempts to peek the first element without removing it.
Top
Extension Methods
 NameDescription
Public Extension MethodMethodInvoke Calls the object method by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGet Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGetT Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertySet Sets the value of the object property by name.
(Defined by ObjectEx)
Top
See Also