Share via


ImmutableInterlocked.TryDequeue<T>(ImmutableQueue<T>, T) Método

Definição

Remove atomicamente e retorna o elemento especificado no cabeçalho da fila, se a fila não estiver vazia.

public:
generic <typename T>
 static bool TryDequeue(System::Collections::Immutable::ImmutableQueue<T> ^ % location, [Runtime::InteropServices::Out] T % value);
public static bool TryDequeue<T> (ref System.Collections.Immutable.ImmutableQueue<T> location, out T value);
static member TryDequeue : ImmutableQueue * 'T -> bool
Public Shared Function TryDequeue(Of T) (ByRef location As ImmutableQueue(Of T), ByRef value As T) As Boolean

Parâmetros de tipo

T

O tipo de itens na fila.

Parâmetros

location
ImmutableQueue<T>

A variável ou o campo para atualizar atomicamente.

value
T

Definido como o valor do cabeçalho da fila, se a fila não estiver vazia.

Retornos

true se a fila não estiver vazia e o elemento de cabeçalho for removido; caso contrário, false.

Aplica-se a