This commit is contained in:
fourtf
2017-01-04 15:12:31 +01:00
parent 4716894027
commit 7a7b714e78
15 changed files with 437 additions and 18 deletions
+14
View File
@@ -0,0 +1,14 @@
#ifndef ASYNCEXEC_H
#define ASYNCEXEC_H
#include "QThreadPool"
#include "QRunnable"
#include "lambdaqrunnable.h"
#include "qcoreapplication.h"
#define async_start QThreadPool::globalInstance()->start(new LambdaQRunnable(
#define async_end ));
#define async_exec(a) QThreadPool::globalInstance()->start(new LambdaQRunnable([]{ a; }));
#endif // ASYNCEXEC_H