LMMS
Loading...
Searching...
No Matches
juce::ChildProcessPingThread Struct Referenceabstract
Inheritance diagram for juce::ChildProcessPingThread:
juce::Thread juce::AsyncUpdater ChildProcessCoordinator::Connection ChildProcessWorker::Connection

Public Member Functions

 ChildProcessPingThread (int timeout)
void startPinging ()
void pingReceived () noexcept
void triggerConnectionLostMessage ()
virtual bool sendPingMessage (const MemoryBlock &)=0
virtual void pingFailed ()=0
void cancelPendingUpdate () noexcept
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

int timeoutMs

Private Member Functions

void handleAsyncUpdate () override
void run () override
Private Member Functions inherited from juce::AsyncUpdater
 AsyncUpdater ()
virtual ~AsyncUpdater ()
void triggerAsyncUpdate ()
void cancelPendingUpdate () noexcept
void handleUpdateNowIfNeeded ()
bool isUpdatePending () const noexcept

Private Attributes

Atomic< intcountdown

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

◆ ChildProcessPingThread()

juce::ChildProcessPingThread::ChildProcessPingThread ( int timeout)
inline

Member Function Documentation

◆ cancelPendingUpdate()

void juce::AsyncUpdater::cancelPendingUpdate ( )
noexcept

This will stop any pending updates from happening.

If called after triggerAsyncUpdate() and before the handleAsyncUpdate() callback happens, this will cancel the handleAsyncUpdate() callback.

Note that this method simply cancels the next callback - if a callback is already in progress on a different thread, this won't block until the callback finishes, so there's no guarantee that the callback isn't still running when the method returns.

◆ handleAsyncUpdate()

void juce::ChildProcessPingThread::handleAsyncUpdate ( )
inlineoverrideprivatevirtual

Called back to do whatever your class needs to do.

This method is called by the message thread at the next convenient time after the triggerAsyncUpdate() method has been called.

Implements juce::AsyncUpdater.

◆ pingFailed()

virtual void juce::ChildProcessPingThread::pingFailed ( )
pure virtual

◆ pingReceived()

void juce::ChildProcessPingThread::pingReceived ( )
inlinenoexcept

◆ run()

void juce::ChildProcessPingThread::run ( )
inlineoverrideprivatevirtual

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.

◆ sendPingMessage()

virtual bool juce::ChildProcessPingThread::sendPingMessage ( const MemoryBlock & )
pure virtual

◆ startPinging()

void juce::ChildProcessPingThread::startPinging ( )
inline

◆ triggerConnectionLostMessage()

void juce::ChildProcessPingThread::triggerConnectionLostMessage ( )
inline

Member Data Documentation

◆ countdown

Atomic<int> juce::ChildProcessPingThread::countdown
private

◆ timeoutMs

int juce::ChildProcessPingThread::timeoutMs

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