ConcurrentQueue<T>.IProducerConsumerCollection<T>.TryTake 메서드

정의

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

매개 변수

item
T

이 메서드가 반환될 경우 작업이 성공했으면 item에는 제거된 개체가 들어 있습니다. 제거할 수 있는 개체가 없으면 이 값은 지정되지 않습니다.

반환

요소가 성공적으로 제거되고 반환되었으면 true이고, 그렇지 않으면 false입니다.

구현

설명

의 경우 ConcurrentQueue<T>이 작업은 의 시작 부분에서 개체를 제거하려고 시도합니다 ConcurrentQueue<T>.

적용 대상

추가 정보