This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/async/async_call.h
2021-05-20 18:27:45 +08:00

17 lines
310 B
C++

#ifndef ASYNC_CALL_H
#define ASYNC_CALL_H
#include <QThreadPool>
#include <QtConcurrent/QtConcurrent>
class AsyncCall {
public:
static void ensureRunInThreadPool(QThreadPool *threadPool, std::function<void()> lambda)
{
QtConcurrent::run(threadPool, lambda);
}
};
#endif // ASYNC_CALL_H