Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
asynclauncher.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021-2024 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#include "asynclauncher.h"
9namespace QH {
10
11AsyncLauncher::AsyncLauncher(QThread *thread, QObject *ptr):
12 Async(thread, ptr) {
13}
14
15
16bool AsyncLauncher::run(const Async::Job &action, bool wait) {
17 return asyncLauncher(action, wait);
18}
19
20}
AsyncLauncher(QThread *thread, QObject *ptr=nullptr)
AsyncLauncher This is base constructor of the AsyncLauncher object.
bool run(const Job &action, bool wait=false)
run This method run the action function in the work thread of this object.
The Async class This is bundle of async templates and async wrappers.
Definition async.h:26
std::function< bool()> Job
Definition async.h:35
bool asyncLauncher(const Job &job, bool await=false, bool freaze=true) const
asyncLauncher This method invoke a job on the thread (using the asyncHandler method) of this object.
Definition async.cpp:80
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13