FMLiveSwitchManagedConcurrentQueue Class Reference

A thread-safe queue. More...

Instance Methods

(void) - enqueueWithItem:
 Add the item to the end of the queue. More...
 
(instancetype) - init
 Creates a new ConcurrentQueue. More...
 
(bool) - isEmpty
 Gets true if the queue is empty. More...
 
(bool) - tryDequeueWithItem:
 Removes and returns the item at the front of the queue. More...
 
(bool) - tryPeekWithItem:
 Peeks at the first item in the queue. More...
 

Class Methods

(FMLiveSwitchManagedConcurrentQueue *) + managedConcurrentQueue
 Creates a new ConcurrentQueue. More...
 

Protected Attributes

 __pad0__: NSObject- (int) count
 

Detailed Description

A thread-safe queue.

Method Documentation

◆ enqueueWithItem:

- (void) enqueueWithItem: (T)  item

Add the item to the end of the queue.

Parameters
itemThe item to add.

◆ init

- (instancetype) init

Creates a new ConcurrentQueue.

◆ isEmpty

- (bool) isEmpty

Gets true if the queue is empty.

◆ managedConcurrentQueue

+ (FMLiveSwitchManagedConcurrentQueue*) managedConcurrentQueue

Creates a new ConcurrentQueue.

◆ tryDequeueWithItem:

- (bool) tryDequeueWithItem: (T *)  item

Removes and returns the item at the front of the queue.

Parameters
itemThe dequeued item.
Returns
True if item received, false if no item.

◆ tryPeekWithItem:

- (bool) tryPeekWithItem: (T *)  item

Peeks at the first item in the queue.

Parameters
itemThe item at the front of the queue.
Returns
False if queue is empty. True if first item peeked at.

Member Data Documentation

◆ __pad0__

- __pad0__
protected