Public Types | Public Member Functions | List of all members
MultithreadedLockfreeQueue< ElementType, ConfigurationType > Class Template Reference

A wrapper around moodycamels ConcurrentQueue with more JUCE like interface and some assertions. More...

Public Types

using ElementFunction = std::function< MultithreadedQueueHelpers::ReturnStatus(ElementType &t)>
 A function prototype for functions that can be called on a ElementType. More...
 

Public Member Functions

bool copyMultiple (ElementType *source, int numElements)
 Copies multiple elements into the queue. More...
 
bool moveMultiple (ElementType *source, int numElements)
 Moves multiple elements into the queue. More...
 
void setThreadTokens (const Array< MultithreadedQueueHelpers::PublicToken > &threadTokens, const ElementFunction &clearFunction=ElementFunction())
 This initialised the queue with the thread Ids. More...
 

Detailed Description

template<typename ElementType, MultithreadedQueueHelpers::Configuration ConfigurationType = MultithreadedQueueHelpers::DefaultConfiguration>
class hise::MultithreadedLockfreeQueue< ElementType, ConfigurationType >

A wrapper around moodycamels ConcurrentQueue with more JUCE like interface and some assertions.

Member Typedef Documentation

using ElementFunction = std::function<MultithreadedQueueHelpers::ReturnStatus(ElementType& t)>

A function prototype for functions that can be called on a ElementType.

Member Function Documentation

bool copyMultiple ( ElementType *  source,
int  numElements 
)
inline

Copies multiple elements into the queue.

If you don't need the data afterwards, use moveMultiple instead.

bool moveMultiple ( ElementType *  source,
int  numElements 
)
inline

Moves multiple elements into the queue.

The original data is invalid after this operation.

void setThreadTokens ( const Array< MultithreadedQueueHelpers::PublicToken > &  threadTokens,
const ElementFunction clearFunction = ElementFunction() 
)
inline

This initialised the queue with the thread Ids.

Best use KillstateHandler.createTokens() for this.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.