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... | |
A wrapper around moodycamels ConcurrentQueue with more JUCE like interface and some assertions.
using ElementFunction = std::function<MultithreadedQueueHelpers::ReturnStatus(ElementType& t)> |
A function prototype for functions that can be called on a ElementType.
|
inline |
Copies multiple elements into the queue.
If you don't need the data afterwards, use moveMultiple instead.
|
inline |
Moves multiple elements into the queue.
The original data is invalid after this operation.
|
inline |
This initialised the queue with the thread Ids.
Best use KillstateHandler.createTokens() for this.