VSTGUI: VSTGUI::Standalone::Async Namespace Reference

VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Namespace List
- Namespace Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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

using GroupPtr = std::shared_ptr<Group>

using QueuePtr = std::shared_ptr<Queue>

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

## Function Documentation

const QueuePtr& VSTGUI::Standalone::Async::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.

const QueuePtr& VSTGUI::Standalone::Async::mainQueue | ( |  | ) |

Get main/UI serial queue.

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

QueuePtr VSTGUI::Standalone::Async::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

void VSTGUI::Standalone::Async::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