JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
juce::dsp::BackgroundMessageQueue Class Reference
Inheritance diagram for juce::dsp::BackgroundMessageQueue:
juce::Thread juce::dsp::ConvolutionMessageQueue::Impl

Public Types

using IncomingCommand = FixedSizeFunction< 400, void()>
 

Public Member Functions

 BackgroundMessageQueue (int entries)
 
bool push (IncomingCommand &command)
 
void popAll ()
 
bool startThread ()
 Attempts to start a new thread with default ('Priority::normal') priority.
 
bool startThread (Priority newPriority)
 Attempts to start a new thread with a given priority.
 
bool stopThread (int timeOutMilliseconds)
 Attempts to stop the thread running.
 

Detailed Description

Definition at line 73 of file juce_Convolution.cpp.

Member Typedef Documentation

◆ IncomingCommand

using juce::dsp::BackgroundMessageQueue::IncomingCommand = FixedSizeFunction<400, void()>

Definition at line 80 of file juce_Convolution.cpp.

Constructor & Destructor Documentation

◆ BackgroundMessageQueue()

juce::dsp::BackgroundMessageQueue::BackgroundMessageQueue ( int  entries)
explicit

Definition at line 76 of file juce_Convolution.cpp.

Member Function Documentation

◆ popAll()

void juce::dsp::BackgroundMessageQueue::popAll ( )

Definition at line 87 of file juce_Convolution.cpp.

◆ push()

bool juce::dsp::BackgroundMessageQueue::push ( IncomingCommand &  command)

Definition at line 85 of file juce_Convolution.cpp.

◆ startThread() [1/2]

bool juce::Thread::startThread ( )

Attempts to start a new thread with default ('Priority::normal') priority.

This will cause the thread's run() method to be called by a new thread. If this thread is already running, startThread() won't do anything.

If a thread cannot be created with the requested priority, this will return false and Thread::run() will not be called. An exception to this is the Android platform, which always starts a thread and attempts to upgrade the thread after creation.

Returns
true if the thread started successfully. false if it was unsuccesful.
See also
stopThread

Definition at line 256 of file juce_Thread.cpp.

◆ startThread() [2/2]

bool juce::Thread::startThread ( Priority  newPriority)

Attempts to start a new thread with a given priority.

This will cause the thread's run() method to be called by a new thread. If this thread is already running, startThread() won't do anything.

If a thread cannot be created with the requested priority, this will return false and Thread::run() will not be called. An exception to this is the Android platform, which always starts a thread and attempts to upgrade the thread after creation.

Parameters
newPriorityPriority the thread should be assigned. This parameter is ignored on Linux.
Returns
true if the thread started successfully, false if it was unsuccesful.
See also
startThread, setPriority, startRealtimeThread

Definition at line 274 of file juce_Thread.cpp.

◆ stopThread()

bool juce::Thread::stopThread ( int  timeOutMilliseconds)

Attempts to stop the thread running.

This method will cause the threadShouldExit() method to return true and call notify() in case the thread is currently waiting.

Hopefully the thread will then respond to this by exiting cleanly, and the stopThread method will wait for a given time-period for this to happen.

If the thread is stuck and fails to respond after the timeout, it gets forcibly killed, which is a very bad thing to happen, as it could still be holding locks, etc. which are needed by other parts of your program.

Parameters
timeOutMillisecondsThe number of milliseconds to wait for the thread to finish before killing it by force. A negative value in here will wait forever.
Returns
true if the thread was cleanly stopped before the timeout, or false if it had to be killed by force.
See also
signalThreadShouldExit, threadShouldExit, waitForThreadToExit, isThreadRunning

Definition at line 309 of file juce_Thread.cpp.


The documentation for this class was generated from the following file: