LMMS
Loading...
Searching...
No Matches
juce::ThreadPool::ThreadPoolThread Struct Reference
Inheritance diagram for juce::ThreadPool::ThreadPoolThread:
juce::Thread

Public Member Functions

 ThreadPoolThread (ThreadPool &p, size_t stackSize)
void run () override
Public Member Functions inherited from juce::Thread
 Thread (const String &threadName, size_t threadStackSize=0)
virtual ~Thread ()
void startThread ()
void startThread (int priority)
bool stopThread (int timeOutMilliseconds)
bool isThreadRunning () const
void signalThreadShouldExit ()
bool threadShouldExit () const
bool waitForThreadToExit (int timeOutMilliseconds) const
void addListener (Listener *)
void removeListener (Listener *)
bool setPriority (int priority)
void setAffinityMask (uint32 affinityMask)
bool wait (int timeOutMilliseconds) const
void notify () const
ThreadID getThreadId () const noexcept
const StringgetThreadName () const noexcept

Public Attributes

std::atomic< ThreadPoolJob * > currentJob { nullptr }
ThreadPoolpool

Additional Inherited Members

Public Types inherited from juce::Thread
enum  { realtimeAudioPriority = -1 }
using ThreadID = void*
Static Public Member Functions inherited from juce::Thread
static void launch (std::function< void()> functionToRun)
static bool currentThreadShouldExit ()
static bool setCurrentThreadPriority (int priority)
static void JUCE_CALLTYPE setCurrentThreadAffinityMask (uint32 affinityMask)
static void JUCE_CALLTYPE sleep (int milliseconds)
static void JUCE_CALLTYPE yield ()
static ThreadID JUCE_CALLTYPE getCurrentThreadId ()
static Thread *JUCE_CALLTYPE getCurrentThread ()
static void JUCE_CALLTYPE setCurrentThreadName (const String &newThreadName)

Constructor & Destructor Documentation

◆ ThreadPoolThread()

juce::ThreadPool::ThreadPoolThread::ThreadPoolThread ( ThreadPool & p,
size_t stackSize )
inline

Member Function Documentation

◆ run()

void juce::ThreadPool::ThreadPoolThread::run ( )
inlineoverridevirtual

Must be implemented to perform the thread's actual code.

Remember that the thread must regularly check the threadShouldExit() method whilst running, and if this returns true it should return from the run() method as soon as possible to avoid being forcibly killed.

See also
threadShouldExit, startThread

Implements juce::Thread.

Member Data Documentation

◆ currentJob

std::atomic<ThreadPoolJob*> juce::ThreadPool::ThreadPoolThread::currentJob { nullptr }

◆ pool

ThreadPool& juce::ThreadPool::ThreadPoolThread::pool

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