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

NameConstraints
Tany type

Inheritance

Base classes
Any ConcurrentQueue<T>

Constructors

constructor ConcurrentQueue()
#

Properties

property Count: i32
#

read-only

property IsEmpty: bool
#

read-only

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
#

private

field items: System.Queue<T>
#

private

Inherited members (5)

Source

ConcurrentQueue<T> as Larva HIR, decompiled from its Larva HIR.

System.Threading.ConcurrentQueue.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
}
Esc