diff options
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r-- | common/resourceaccess.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 31b9e79..9fb0d4c 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -161,9 +161,13 @@ void ResourceAccess::sendCommand(int commandId, flatbuffers::FlatBufferBuilder & | |||
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | void ResourceAccess::synchronizeResource(const std::function<void()> &resultHandler) | 164 | Async::Job<void> ResourceAccess::synchronizeResource() |
165 | { | 165 | { |
166 | sendCommand(Commands::SynchronizeCommand, resultHandler); | 166 | return Async::start<void>([this](Async::Future<void> &f) { |
167 | sendCommand(Commands::SynchronizeCommand, [&f]() { | ||
168 | f.setFinished(); | ||
169 | }); | ||
170 | }); | ||
167 | } | 171 | } |
168 | 172 | ||
169 | void ResourceAccess::open() | 173 | void ResourceAccess::open() |