summaryrefslogtreecommitdiff
path: root/zen/async_task.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2015-10-02 14:56:07 +0200
committerDaniel Wilhelm <daniel@wili.li>2015-10-02 14:56:07 +0200
commitde73d25e0b27f4bee2de116d19cab32800785d64 (patch)
tree21de1736d12a92223ad04c02a5b0826d77e5e71c /zen/async_task.h
parent7.1 (diff)
downloadFreeFileSync-de73d25e0b27f4bee2de116d19cab32800785d64.tar.gz
FreeFileSync-de73d25e0b27f4bee2de116d19cab32800785d64.tar.bz2
FreeFileSync-de73d25e0b27f4bee2de116d19cab32800785d64.zip
7.2
Diffstat (limited to 'zen/async_task.h')
-rw-r--r--zen/async_task.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/async_task.h b/zen/async_task.h
index b8d72fbe..5c6f7f6e 100644
--- a/zen/async_task.h
+++ b/zen/async_task.h
@@ -27,7 +27,7 @@ public:
// -> doAsync: the usual thread-safety requirements apply!
// -> evalOnGui: no thread-safety concerns, but must only reference variables with greater-equal lifetime than the AsyncTask instance!
{
- tasks.push_back(zen::async([=]() -> std::function<void()>
+ tasks.push_back(zen::runAsync([=]() -> std::function<void()>
{
auto result = doAsync();
return [=]{ evalOnGui(result); };
@@ -37,7 +37,7 @@ public:
template <class Fun, class Fun2>
void add2(Fun doAsync, Fun2 evalOnGui) //for evalOnGui taking no parameters
{
- tasks.push_back(zen::async([=]() -> std::function<void()> { doAsync(); return [=]{ evalOnGui(); }; }));
+ tasks.push_back(zen::runAsync([doAsync, evalOnGui]() -> std::function<void()> { doAsync(); return [evalOnGui]{ evalOnGui(); }; }));
}
void evalResults() //call from gui thread repreatedly
bgstack15