BatchedJoinBlock<T1,T2>.TryReceive Método

Definición

Intentos de recibir sincrónicamente un elemento de salida disponible de IReceivableSourceBlock<TOutput>.

public:
 virtual bool TryReceive(Predicate<Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^> ^> ^ filter, [Runtime::InteropServices::Out] Tuple<System::Collections::Generic::IList<T1> ^, System::Collections::Generic::IList<T2> ^> ^ % item);
public bool TryReceive (Predicate<Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>> filter, out Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>> item);
public bool TryReceive (Predicate<Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>>? filter, out Tuple<System.Collections.Generic.IList<T1>,System.Collections.Generic.IList<T2>>? item);
abstract member TryReceive : Predicate<System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2>> * Tuple -> bool
override this.TryReceive : Predicate<System.Collections.Generic.IList<'T1> * System.Collections.Generic.IList<'T2>> * Tuple -> bool
Public Function TryReceive (filter As Predicate(Of Tuple(Of IList(Of T1), IList(Of T2))), ByRef item As Tuple(Of IList(Of T1), IList(Of T2))) As Boolean

Parámetros

filter
Predicate<Tuple<IList<T1>,IList<T2>>>

Predicado que un valor debe pasar correctamente para que se reciba. filter puede ser null, en cuyo caso se pasarán todos los elementos.

item
Tuple<IList<T1>,IList<T2>>

Elemento recibido del origen.

Devoluciones

Es true si se pudo recibir un elemento; de lo contrario, es false.

Comentarios

Este método no bloquea la espera de que el origen proporcione un elemento.

Se devolverá después de comprobar si hay un elemento, independientemente de si un elemento estaba disponible o no.

Se aplica a