@@ -12,8 +12,8 @@ namespace util {
|
||||
class AsyncTask::Impl : public RunLoop::Impl::Runnable {
|
||||
public:
|
||||
Impl(std::function<void()>&& fn)
|
||||
: queued(true), task(std::move(fn)) {
|
||||
}
|
||||
: queued(true),
|
||||
task(std::move(fn)) {}
|
||||
|
||||
~Impl() {
|
||||
queued = true;
|
||||
@@ -27,9 +27,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
TimePoint dueTime() const override {
|
||||
return due;
|
||||
}
|
||||
TimePoint dueTime() const override { return due; }
|
||||
|
||||
void runTask() override {
|
||||
if (!queued) {
|
||||
@@ -52,8 +50,7 @@ private:
|
||||
};
|
||||
|
||||
AsyncTask::AsyncTask(std::function<void()>&& fn)
|
||||
: impl(std::make_unique<Impl>(std::move(fn))) {
|
||||
}
|
||||
: impl(std::make_unique<Impl>(std::move(fn))) {}
|
||||
|
||||
AsyncTask::~AsyncTask() = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user