/ fm / liveswitch / ManagedConcurrentQueue
Class: ManagedConcurrentQueue<T>
fm.liveswitch.ManagedConcurrentQueue
A thread-safe queue.
Type parameters
Name |
---|
T |
Table of contents
Constructors
Methods
Constructors
constructor
+ new ManagedConcurrentQueue<T>(): ManagedConcurrentQueue<T>
Creates a new ConcurrentQueue.
Type parameters:
Name |
---|
T |
Returns: ManagedConcurrentQueue<T>
Defined in: Generated/TypeScript/fm.liveswitch/ManagedConcurrentQueue.ts:13
Methods
enqueue
▸ enqueue(item
: T): void
Add the item to the end of the queue.
Parameters:
Name | Type | Description |
---|---|---|
item |
T | The item to add. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ManagedConcurrentQueue.ts:38
getCount
▸ getCount(): number
Gets the amount of items in this queue.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/ManagedConcurrentQueue.ts:50
getIsEmpty
▸ getIsEmpty(): boolean
Gets true if the queue is empty.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/ManagedConcurrentQueue.ts:62
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/ManagedConcurrentQueue.ts:9
tryDequeue
▸ tryDequeue(item
: Holder<T>): boolean
Removes and returns the item at the front of the queue.
Parameters:
Name | Type | Description |
---|---|---|
item |
Holder<T> | The dequeued item. |
Returns: boolean
True if item received, false if no item.
Defined in: Generated/TypeScript/fm.liveswitch/ManagedConcurrentQueue.ts:76
tryPeek
▸ tryPeek(item
: Holder<T>): boolean
Peeks at the first item in the queue.
Parameters:
Name | Type | Description |
---|---|---|
item |
Holder<T> | The item at the front of the queue. |
Returns: boolean
False if queue is empty. True if first item peeked at.
Defined in: Generated/TypeScript/fm.liveswitch/ManagedConcurrentQueue.ts:91