mirror-chatterino2/asyncexec.h

14 lines
260 B
C
Raw Normal View History

2017-01-04 15:12:31 +01:00
#ifndef ASYNCEXEC_H
#define ASYNCEXEC_H
#include "lambdaqrunnable.h"
#include "qcoreapplication.h"
2017-01-18 04:52:47 +01:00
#include <QRunnable>
#include <QThreadPool>
2017-01-11 18:52:09 +01:00
#define async_exec(a) \
QThreadPool::globalInstance()->start(new LambdaQRunnable(a));
2017-01-04 15:12:31 +01:00
2017-01-11 18:52:09 +01:00
#endif // ASYNCEXEC_H