VSTGUI  4.5
Graphical User Interface Framework not only for VST plugins
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
VSTGUI::Standalone::Async Namespace Reference

asynchronous tasks More...

Typedefs

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

Enumerations

enum  Context { Main, Background }
 Asynchronous context. More...
 

Functions

void perform (Context context, Task &&task)
 Schedule a task to be performed asynchronous either on a background thread or on the main thread. More...
 

Detailed Description

asynchronous tasks

Typedef Documentation

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

Enumeration Type Documentation

enum Context
strong

Asynchronous context.

Enumerator
Main 

Main thread context.

Background 

Background thread context.

Function Documentation

void VSTGUI::Standalone::Async::perform ( Context  context,
Task &&  task 
)

Schedule a task to be performed asynchronous either on a background thread or on the main thread.

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

Parameters
contextbackground or main thread
tasktask to be performed