Loading...
Searching...
No Matches
WorkgroupToken Class Reference

Created by AudioWorkgroup to join the calling thread to a workgroup. More...

#include <juce_AudioWorkgroup.h>

Public Types

using Erased = FixedSizeFunction<64, const TokenProvider*()>
 

Public Member Functions

 WorkgroupToken (Erased e)
 
 WorkgroupToken ()=default
 
 ~WorkgroupToken ()=default
 If the token joined the calling thread to a workgroup during construction, the destructor will cause the calling thread to leave that workgroup.
 
 WorkgroupToken (const WorkgroupToken &)=delete
 
 WorkgroupToken (WorkgroupToken &&) noexcept=default
 
WorkgroupTokenoperator= (const WorkgroupToken &)=delete
 
WorkgroupTokenoperator= (WorkgroupToken &&)=default
 
 operator bool () const
 Returns true if and only if getTokenProvider() returns non-null.
 
const TokenProvider * getTokenProvider () const
 The result of this function can be compared to nullptr to check whether the token successfully joined the calling thread to a workgroup.
 
void reset ()
 If this token was engaged by joining a workgroup, leaves that workgroup and disengages the token.
 

Detailed Description

Created by AudioWorkgroup to join the calling thread to a workgroup.

To leave the workgroup again, destroy the WorkgroupToken.

See also
AudioWorkgroup

Member Typedef Documentation

◆ Erased

using WorkgroupToken::Erased = FixedSizeFunction<64, const TokenProvider*()>

Constructor & Destructor Documentation

◆ WorkgroupToken() [1/4]

WorkgroupToken::WorkgroupToken ( Erased e)
explicit

◆ WorkgroupToken() [2/4]

WorkgroupToken::WorkgroupToken ( )
default

◆ ~WorkgroupToken()

WorkgroupToken::~WorkgroupToken ( )
default

If the token joined the calling thread to a workgroup during construction, the destructor will cause the calling thread to leave that workgroup.

◆ WorkgroupToken() [3/4]

WorkgroupToken::WorkgroupToken ( const WorkgroupToken & )
delete

◆ WorkgroupToken() [4/4]

WorkgroupToken::WorkgroupToken ( WorkgroupToken && )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

WorkgroupToken & WorkgroupToken::operator= ( const WorkgroupToken & )
delete

◆ operator=() [2/2]

WorkgroupToken & WorkgroupToken::operator= ( WorkgroupToken && )
default

◆ operator bool()

WorkgroupToken::operator bool ( ) const
explicit

Returns true if and only if getTokenProvider() returns non-null.

References getTokenProvider().

◆ getTokenProvider()

const TokenProvider * WorkgroupToken::getTokenProvider ( ) const
nodiscard

The result of this function can be compared to nullptr to check whether the token successfully joined the calling thread to a workgroup.

Used in the implementation to provide platform-specific information about this token.

Referenced by operator bool().

◆ reset()

void WorkgroupToken::reset ( )

If this token was engaged by joining a workgroup, leaves that workgroup and disengages the token.

After this call, getTokenProvider() will return nullptr.


The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram