Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ManagedConcurrentStack<TValue>

A ConcurrentStack that maps to the appropriate platform version.

Type parameters

  • TValue

Hierarchy

  • ManagedConcurrentStack

Index

Constructors

constructor

  • Creates a new instance of a ConcurrentStack.

    Returns ManagedConcurrentStack

Properties

Private __stack

__stack: InternalConcurrentStack<TValue>
internal

Methods

clear

  • clear(): void
  • Clears the stack of all items.

    Returns void

getCount

  • getCount(): number
  • Gets the amount of items in the stack.

    Returns number

getIsEmpty

  • getIsEmpty(): boolean
  • Gets true if the stack is empty.

    Returns boolean

getTypeString

  • getTypeString(): string
  • Returns string

push

  • push(item: TValue): void
  • Pushes a new item on top of the stack.

    Parameters

    • item: TValue

      The item to push.

    Returns void

tryPeek

  • tryPeek(result: Holder<TValue>): boolean
  • Tries to peek at the top value in stack.

    Parameters

    • result: Holder<TValue>

      The value from the stack if possible, null otherwise.

    Returns boolean

    True if peek succeeded, false if not.

tryPop

  • tryPop(result: Holder<TValue>): boolean
  • Tries to pop the top value off of the stack.

    Parameters

    • result: Holder<TValue>

      The value from the top of the stack if possible, null otherwise.

    Returns boolean

    True if pop suceeded, false if not.