ConcurrentStack<T>.IProducerConsumerCollection<T>.TryTake Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Intenta quitar y devolver un objeto de .IProducerConsumerCollection<T>
virtual bool System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake([Runtime::InteropServices::Out] T % item) = System::Collections::Concurrent::IProducerConsumerCollection<T>::TryTake;
bool IProducerConsumerCollection<T>.TryTake(out T item);
abstract member System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake : 'T -> bool
override this.System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake : 'T -> bool
Function TryTake (ByRef item As T) As Boolean Implements IProducerConsumerCollection(Of T).TryTake
Parámetros
- item
- T
Cuando este método devuelve, si la operación se realizó correctamente, item contiene el objeto quitado. Si no hay ningún objeto disponible para quitarse, el valor no se especifica.
Devoluciones
true si se quitó un elemento y se devolvió correctamente; de lo contrario, false.
Implementaciones
Comentarios
Para ConcurrentStack<T>, esta operación intentará abrir el objeto en la parte superior de ConcurrentStack<T>.