tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tracktion::graph::ThreadPoolSemHybrid< SemaphoreType > Struct Template Reference
Inheritance diagram for tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >:
tracktion::graph::LockFreeMultiThreadedNodePlayer::ThreadPool

Public Member Functions

 ThreadPoolSemHybrid (LockFreeMultiThreadedNodePlayer &p)
 
void createThreads (size_t numThreads, juce::AudioWorkgroup workgroupToUse) override
 Subclasses should implement this to create the given number of threads.
 
void clearThreads () override
 Subclasses should implement this to clear all the threads.
 
void signalOne () override
 Called by the player when a Node becomes available to process.
 
void signal (int numToSignal) override
 Called by the player when more than one Node becomes available to process.
 
void signalAll () override
 Called by the player when more than one Node becomes available to process.
 
void wait ()
 
void waitForFinalNode () override
 Called by the player when the audio thread has no free Nodes to process.
 
- Public Member Functions inherited from tracktion::graph::LockFreeMultiThreadedNodePlayer::ThreadPool
 ThreadPool (LockFreeMultiThreadedNodePlayer &p)
 Constructs a ThreadPool for a given LockFreeMultiThreadedNodePlayer.
 
virtual ~ThreadPool ()=default
 Destructor.
 
void signalShouldExit ()
 Signals the pool that all the threads should exit.
 
void resetExitSignal ()
 Signals the pool that all the threads should continue to run and not exit.
 
bool shouldExit () const
 Returns true if all the threads should exit.
 
bool shouldWait ()
 Returns true if there are no free Nodes to be processed and the calling thread should wait until there are Nodes ready.
 
bool isFinalNodeReady ()
 Returns true if all the Nodes have been processed.
 
bool process ()
 Process the next chain of Nodes.
 
void setCurrentNode (LockFreeMultiThreadedNodePlayer::PreparedNode *nodeInUse)
 Sets the current PreparedNode in use.
 

Additional Inherited Members

- Public Attributes inherited from tracktion::graph::LockFreeMultiThreadedNodePlayer::ThreadPool
LockFreeMultiThreadedNodePlayerplayer
 

Detailed Description

template<typename SemaphoreType>
struct tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >

Definition at line 554 of file tracktion_NodePlayerThreadPools.cpp.

Constructor & Destructor Documentation

◆ ThreadPoolSemHybrid()

template<typename SemaphoreType >
tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >::ThreadPoolSemHybrid ( LockFreeMultiThreadedNodePlayer p)

Definition at line 556 of file tracktion_NodePlayerThreadPools.cpp.

Member Function Documentation

◆ clearThreads()

template<typename SemaphoreType >
void tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >::clearThreads ( )
overridevirtual

Subclasses should implement this to clear all the threads.

Implements tracktion::graph::LockFreeMultiThreadedNodePlayer::ThreadPool.

Definition at line 582 of file tracktion_NodePlayerThreadPools.cpp.

◆ createThreads()

template<typename SemaphoreType >
void tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >::createThreads ( size_t  numThreads,
juce::AudioWorkgroup   
)
overridevirtual

Subclasses should implement this to create the given number of threads.

Implements tracktion::graph::LockFreeMultiThreadedNodePlayer::ThreadPool.

Definition at line 561 of file tracktion_NodePlayerThreadPools.cpp.

◆ signal()

template<typename SemaphoreType >
void tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >::signal ( int  numToSignal)
overridevirtual

Called by the player when more than one Node becomes available to process.

Subclasses should use this to try and get a thread to call process as soon as possible.

Implements tracktion::graph::LockFreeMultiThreadedNodePlayer::ThreadPool.

Definition at line 598 of file tracktion_NodePlayerThreadPools.cpp.

◆ signalAll()

template<typename SemaphoreType >
void tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >::signalAll ( )
overridevirtual

Called by the player when more than one Node becomes available to process.

Subclasses should use this to try and get a thread to call process as soon as possible.

Implements tracktion::graph::LockFreeMultiThreadedNodePlayer::ThreadPool.

Definition at line 603 of file tracktion_NodePlayerThreadPools.cpp.

◆ signalOne()

template<typename SemaphoreType >
void tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >::signalOne ( )
overridevirtual

Called by the player when a Node becomes available to process.

Subclasses should use this to try and get a thread to call process as soon as possible.

Implements tracktion::graph::LockFreeMultiThreadedNodePlayer::ThreadPool.

Definition at line 593 of file tracktion_NodePlayerThreadPools.cpp.

◆ wait()

template<typename SemaphoreType >
void tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >::wait ( )

Definition at line 608 of file tracktion_NodePlayerThreadPools.cpp.

◆ waitForFinalNode()

template<typename SemaphoreType >
void tracktion::graph::ThreadPoolSemHybrid< SemaphoreType >::waitForFinalNode ( )
overridevirtual

Called by the player when the audio thread has no free Nodes to process.

Subclasses should can use this to either spin, pause or wait until a Node does become free or isFinalNodeReady returns true.

Implements tracktion::graph::LockFreeMultiThreadedNodePlayer::ThreadPool.

Definition at line 649 of file tracktion_NodePlayerThreadPools.cpp.


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