OpenShot Audio Library | OpenShotAudio: juce::WorkgroupToken Class Reference

OpenShot Audio Library | OpenShotAudio 0.4.0 |

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
juce::WorkgroupToken Class Reference

`#include <juce_AudioWorkgroup.h>`

## Public Types
using | Erased = FixedSizeFunction<64, const TokenProvider*()>

## Public Member Functions
| WorkgroupToken (Erased e)
| WorkgroupToken ()=default
| ~WorkgroupToken ()=default
| WorkgroupToken (const WorkgroupToken &)=delete
| WorkgroupToken (WorkgroupToken &&) noexcept=default
WorkgroupToken & | operator= (const WorkgroupToken &)=delete
WorkgroupToken & | operator= (WorkgroupToken &&)=default
| operator bool () const
const TokenProvider * | getTokenProvider () const
void | reset ()

## Detailed Description

Created by AudioWorkgroup to join the calling thread to a workgroup. To leave the workgroup again, destroy the WorkgroupToken.

See also
  AudioWorkgroup

Definition at line 35 of file juce_AudioWorkgroup.h.

## Member Typedef Documentation

## ◆ Erased

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

Definition at line 42 of file juce_AudioWorkgroup.h.

## Constructor & Destructor Documentation

## ◆ WorkgroupToken() [1/3]

juce::WorkgroupToken::WorkgroupToken | ( | Erased | e | ) |
| inlineexplicit

Creates a WorkgroupToken from a function returning a TokenProvider.

Definition at line 48 of file juce_AudioWorkgroup.h.

Referenced by operator=(), and WorkgroupToken().

## ◆ WorkgroupToken() [2/3]

juce::WorkgroupToken::WorkgroupToken | ( |  | ) |
| default

Creates a disengaged WorkgroupToken, i.e. create a token without joining the thread to a workgroup.

## ◆ ~WorkgroupToken()

juce::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/3]

juce::WorkgroupToken::WorkgroupToken | ( | const WorkgroupToken & |  | ) |
| delete

## Member Function Documentation

## ◆ getTokenProvider()

const TokenProvider * juce::WorkgroupToken::getTokenProvider | ( |  | ) | const
| inlinenodiscard

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.

Definition at line 80 of file juce_AudioWorkgroup.h.

Referenced by operator bool().

## ◆ operator bool()

juce::WorkgroupToken::operator bool | ( |  | ) | const
| inlineexplicit

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

Definition at line 73 of file juce_AudioWorkgroup.h.

## ◆ operator=()

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

## ◆ reset()

void juce::WorkgroupToken::reset | ( |  | ) |
| inline

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

After this call, getTokenProvider() will return nullptr.

Definition at line 86 of file juce_AudioWorkgroup.h.

Referenced by juce::AudioWorkgroup::join().

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

- juce_AudioWorkgroup.h