ConcurrentStack<T>.TryPopRange 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
| Name | Description |
|---|---|
| TryPopRange(T[], Int32, Int32) |
원자성으로 위쪽 ConcurrentStack<T> 에서 여러 개체를 팝하고 반환하려고 시도합니다. |
| TryPopRange(T[]) |
원자성으로 위쪽 ConcurrentStack<T> 에서 여러 개체를 팝하고 반환하려고 시도합니다. |
TryPopRange(T[], Int32, Int32)
원자성으로 위쪽 ConcurrentStack<T> 에서 여러 개체를 팝하고 반환하려고 시도합니다.
public:
int TryPopRange(cli::array <T> ^ items, int startIndex, int count);
public int TryPopRange(T[] items, int startIndex, int count);
member this.TryPopRange : 'T[] * int * int -> int
Public Function TryPopRange (items As T(), startIndex As Integer, count As Integer) As Integer
매개 변수
- items
- T[]
Array 맨 위에서 튀어나온 개체가 ConcurrentStack<T> 추가됩니다.
- startIndex
- Int32
위쪽에서 items 요소를 삽입하기 시작할 0부터 시작하는 오프셋입니다 ConcurrentStack<T>.
- count
- Int32
위쪽에서 팝하여 에 삽입items할 요소의 ConcurrentStack<T> 수입니다.
반품
스택의 맨 위에서 성공적으로 팝되어 삽입된 개체의 수입니다 items.
예외
items null 참조(Visual Basic 없음)입니다.
startIndex 또는 count 음수입니다. 또는 startIndex .의 items길이보다 크거나 같은 경우
startIndex
+
count 가 .의 items길이보다 큰 경우
설명
여러 항목을 표시할 때 스택에 경합이 거의 없는 경우 TryPopRange를 사용하는 것이 제거할 항목당 한 번 사용하는 TryPop 것보다 더 효율적일 수 있습니다. 노드는 startIndex에서 팝되는 첫 번째 항목, startIndex + 1에서 터지는 두 번째 항목 등으로 배열을 채웁니다 items .
추가 정보
적용 대상
TryPopRange(T[])
원자성으로 위쪽 ConcurrentStack<T> 에서 여러 개체를 팝하고 반환하려고 시도합니다.
public:
int TryPopRange(cli::array <T> ^ items);
public int TryPopRange(T[] items);
member this.TryPopRange : 'T[] -> int
Public Function TryPopRange (items As T()) As Integer
매개 변수
- items
- T[]
Array 맨 위에서 튀어나온 개체가 ConcurrentStack<T> 추가됩니다.
반품
위쪽에서 성공적으로 팝되어 삽입된 개체의 ConcurrentStack<T> 수입니다 items.
예외
items null 인수(Visual Basic 없음)입니다.
설명
여러 항목을 표시할 때 스택에 경합이 거의 없는 경우 제거할 항목당 한 번 사용하는 TryPopRange 것보다 사용 TryPop 이 더 효율적일 수 있습니다. 노드는 startIndex에서 팝되는 첫 번째 항목, startIndex + 1에서 터지는 두 번째 항목 등으로 배열을 채웁니다 items .
코드 예제는 .를 참조하세요 ConcurrentStack<T>.