From cfb6238ad7fe7dd7d2eca64676437bb871802375 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 18 Feb 2022 17:59:28 +0100 Subject: Faster image loading/thumbnail creation by using multiple threads --- include/AsyncTask.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/AsyncTask.hpp') diff --git a/include/AsyncTask.hpp b/include/AsyncTask.hpp index e256dc7..358e06a 100644 --- a/include/AsyncTask.hpp +++ b/include/AsyncTask.hpp @@ -20,14 +20,14 @@ namespace QuickMedia { thread = std::thread(&AsyncTask::thread_handler, this, std::move(promise), std::move(callback_func), std::forward(args)...); } - AsyncTask(AsyncTask &&other) { + AsyncTask(AsyncTask &&other) noexcept { cancel(); std::lock_guard lock(mutex); thread = std::move(other.thread); future = std::move(other.future); } - AsyncTask& operator=(AsyncTask &&other) { + AsyncTask& operator=(AsyncTask &&other) noexcept { cancel(); std::lock_guard lock(mutex); thread = std::move(other.thread); -- cgit v1.2.3