![]() |
Heart 1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
|
The AsyncLauncher class is wraper of the Async class for support moving invokes to thread of the current object. More...
#include <asynclauncher.h>


Public Member Functions | |
| AsyncLauncher (QThread *thread) | |
| 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. | |
| bool | stop () |
| stop This method stop the work thread of this object. | |
| bool | waitForStop () |
| waitForStop This method wait for the thread of this object is stopped. | |
| Public Member Functions inherited from QH::Async | |
| 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. | |
Additional Inherited Members | |
| Public Types inherited from QH::Async | |
| using | Job = std::function<bool()> |
| Protected Member Functions inherited from QH::Async | |
| Async (QThread *thread) | |
| Async This is default constructor of the async object. | |
| ~Async () | |
| bool | waitFor (bool *condition, int timeout=WAIT_TIME, bool freaze=true) const |
| waitFor This is base wait function. | |
| bool | waitFor (const Job &condition, int timeout=WAIT_TIME, bool freaze=true) const |
| waitFor This is base wait function. | |
The AsyncLauncher class is wraper of the Async class for support moving invokes to thread of the current object.
Definition at line 31 of file asynclauncher.h.
| QH::AsyncLauncher::AsyncLauncher | ( | QThread * | thread | ) |
AsyncLauncher This is base constructor of the AsyncLauncher object.
| thread | This is pointer to the work thread. If you want to change thread in run time just use the setThread method. |
| ptr | This is QObject parent. |
Definition at line 13 of file asynclauncher.cpp.


| bool QH::AsyncLauncher::run | ( | const Job & | action, |
| bool | wait = false ) |
run This method run the action function in the work thread of this object.
| action | This is function for running in the work thread. |
| wait | This option for sets awaiting of the finishing the action function. By default this is false. |
Definition at line 18 of file asynclauncher.cpp.

| bool QH::AsyncLauncher::stop | ( | ) |
stop This method stop the work thread of this object.
Definition at line 26 of file asynclauncher.cpp.
| bool QH::AsyncLauncher::waitForStop | ( | ) |
waitForStop This method wait for the thread of this object is stopped.
Definition at line 34 of file asynclauncher.cpp.