class · System.Threading
ConcurrentQueue<T>
public class System.Threading.ConcurrentQueue<T> : System.Any
A queue several threads use at once (a lock around a Queue).
- Kind
- class
- Namespace
- System.Threading
- Assembly
- System.Core
- Access
- public, final
- Source file
Threading.ant
Type parameters
| Name | Constraints |
|---|---|
T | any type |
Inheritance
- Base classes
-
AnyConcurrentQueue<T>
Constructors
constructor ConcurrentQueue()
#
Properties
Methods
method Enqueue(item: T) -> void
#
method TryDequeue(fallback: T) -> T
#
The first item, taken out; fallback when the queue is empty.
method Dispose() -> void
#
Frees what it holds (it must not be used after).
Private and internal members (2)
field mutex: System.Threading.Mutex
#
field items: System.Queue<T>
#
Inherited members (5)
GetTypemethod from AnyUndescribedmethod from AnyToStringmethod from AnyHashmethod from Anydestroymethod from Any
Source
ConcurrentQueue<T> as Larva HIR, decompiled from its Larva HIR.
// A queue several threads use at once (a lock around a Queue).
public class System.Threading.ConcurrentQueue<T> : System.Any
{
field mutex: System.Threading.Mutex
field items: System.Queue<T>
constructor ConcurrentQueue()
method Enqueue(item: T) -> void
// The first item, taken out; `fallback` when the queue is empty.
method TryDequeue(fallback: T) -> T
// Frees what it holds (it must not be used after).
method Dispose() -> void
property Count: i32
property IsEmpty: bool
}