35 #include <QMutexLocker> 36 #include <QFutureInterface> 50 QMutex FunctionsMutex_;
53 using QThread::QThread;
57 virtual void Initialize () = 0;
58 virtual void Cleanup () = 0;
63 QFutureInterface<ResultOf_t<F ()>> iface;
65 auto reporting = [func, iface] ()
mutable 67 iface.reportStarted ();
72 QMutexLocker locker { &FunctionsMutex_ };
73 Functions_ << reporting;
78 return iface.future ();
EnableIf_t<!std::is_same< R, void >::value > ReportFutureResult(QFutureInterface< R > &iface, F &&f, Args &&...args)
QFuture< ResultOf_t< F()> > ScheduleImpl(const F &func)