ASPiK SDK
VSTGUI::Standalone::Async Namespace Reference

Typedefs

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

Enumerations

enum  Context { Context::Main, Context::Background }
 

Functions

void perform (Context context, Task &&task)
 
void waitAllTasksDone ()
 

Detailed Description

asynchronous tasks

Enumeration Type Documentation

◆ Context

Asynchronous context.

Enumerator
Main 

Main thread context.

Background 

Background thread context.

Function Documentation

◆ perform()

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