Class ManagedConcurrentQueue<T>
A thread-safe queue.
Inheritance
System.Object
ManagedConcurrentQueue<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class ManagedConcurrentQueue<T>
Type Parameters
Name | Description |
---|---|
T | The type that the queue holds. |
Constructors
ManagedConcurrentQueue()
Creates a new ConcurrentQueue.
Declaration
public ManagedConcurrentQueue()
Properties
Count
Gets the amount of items in this queue.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsEmpty
Gets true if the queue is empty.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Enqueue(T)
Add the item to the end of the queue.
Declaration
public void Enqueue(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to add. |
TryDequeue(out T)
Removes and returns the item at the front of the queue.
Declaration
public bool TryDequeue(out T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The dequeued item. |
Returns
Type | Description |
---|---|
System.Boolean | True if item received, false if no item. |
TryPeek(out T)
Peeks at the first item in the queue.
Declaration
public bool TryPeek(out T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item at the front of the queue. |
Returns
Type | Description |
---|---|
System.Boolean | False if queue is empty. True if first item peeked at. |