VSTGUI
4.10
Graphical User Interface Framework not only for VST plugins
|
Group of asynchronous tasks. More...
Public Member Functions | |
template<typename T > | |
bool | add (T &&task) |
Add a task to the group. | |
bool | start (Task &&finishTask=nullptr) |
Start the groups tasks. | |
Static Public Member Functions | |
static GroupPtr | make (QueuePtr queue) |
Create a new group. | |
Group of asynchronous tasks.
|
inline |
Add a task to the group.
If the group was started, new tasks cannot be added.
task | the task to add |
Create a new group.
Note that all calls to the group must be from one thread. If you want to call them from different threads, you have to lock the access of it with a mutex yourself.
queue | the queue where to schedule the groups tasks |
|
inline |
Start the groups tasks.
A group can only be started once. The optional finishTask is performed after all tasks in this group have executed. The finish task will execute on the same queue as the tasks.
finishTask | an optional task to run after all group tasks were executed. |