VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Loading...
Searching...
No Matches
Classes | Typedefs | Functions
VSTGUI::Standalone::Async Namespace Reference
Standalone Library

asynchronous tasks More...

## Classes
struct | Group
| Group of asynchronous tasks. More...

## Typedefs
using | QueuePtr = std::shared_ptr<Queue>
using | GroupPtr = std::shared_ptr<Group>
using | Task = std::function<void ()>

## Functions
const QueuePtr & | mainQueue ()
| Get main/UI serial queue.
const QueuePtr & | backgroundQueue ()
| Get background concurrent queue.
QueuePtr | makeSerialQueue (const char *name)
| Make a new serial queue.
void | schedule (QueuePtr queue, Task &&task)
| Schedule a task to be performed asynchronous on a queue.

## Detailed Description

asynchronous tasks

## Typedef Documentation

## ◆ GroupPtr

using GroupPtr = std::shared_ptr<Group>

## ◆ QueuePtr

using QueuePtr = std::shared_ptr<Queue>

## ◆ Task

using Task = std::function<void ()>

## Function Documentation

## ◆ backgroundQueue()

const QueuePtr & backgroundQueue | ( |  | ) |

Get background concurrent queue.

Tasks scheduled on this queue are performed concurrently on background threads. The number of background threads are depending on the systems number of CPU cores.

## ◆ mainQueue()

const QueuePtr & mainQueue | ( |  | ) |

Get main/UI serial queue.

Tasks scheduled on this queue are performed serially on the main/ui thread.

## ◆ makeSerialQueue()

QueuePtr makeSerialQueue | ( | const char * | name | ) |

Make a new serial queue.

Tasks scheduled on this queue are performed serially on a background thread.

Parameters

  name | the name of the serial queue (optional)

Returns
  a new serial queue

## ◆ schedule()

void schedule | ( | QueuePtr | queue,
|  | Task && | task )

Schedule a task to be performed asynchronous on a queue.

Can be called from any thread, but should not be called from realtime constraint threads as it may involves locks and memory allocations

Parameters

  queue | on which queue to perform the task
  task | task to be performed