Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ManagedConcurrentQueue<T>

A thread-safe queue.
The type that the queue holds.

Type parameters

  • T

Hierarchy

  • ManagedConcurrentQueue

Index

Constructors

constructor

  • Creates a new ConcurrentQueue.

    Returns ManagedConcurrentQueue

Properties

Private __queue

internal

Methods

enqueue

  • enqueue(item: T): void
  • Add the item to the end of the queue.

    Parameters

    • item: T

      The item to add.

    Returns void

getCount

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

    Returns number

getIsEmpty

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

    Returns boolean

getTypeString

  • getTypeString(): string
  • Returns string

tryDequeue

  • tryDequeue(item: Holder<T>): boolean
  • Removes and returns the item at the front of the queue.

    Parameters

    • item: Holder<T>

      The dequeued item.

    Returns boolean

    True if item received, false if no item.

tryPeek

  • tryPeek(item: Holder<T>): boolean
  • Peeks at the first item in the queue.

    Parameters

    • item: Holder<T>

      The item at the front of the queue.

    Returns boolean

    False if queue is empty. True if first item peeked at.