summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-05-10 00:53:20 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2026-05-10 00:53:20 +0100
commit4739bb6a1565e69492eb0349298d86d4d0daad38 (patch)
tree447e5846ad1421fc328e5230dc58e8b81785ccd6 /src
parent5111c39ad9c1665347471da9fc1ae5737e37cde5 (diff)
downloadwebstat-0.5.tar.bz2
webstat-0.5.tar.xz
webstat-0.5.zip
Force use of std::launch::asyncHEADwebstat-0.5main
Deferred policy is not good enough to avoid blocking the main thread... it would just mean in blocked later and that's not the point here.
Diffstat (limited to 'src')
-rw-r--r--src/ingestor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ingestor.cpp b/src/ingestor.cpp
index 5d7243a..88bea9f 100644
--- a/src/ingestor.cpp
+++ b/src/ingestor.cpp
@@ -308,7 +308,7 @@ namespace WebStat {
if (processingLines.empty()) {
std::swap(queuedLines, processingLines);
}
- return {storeQueueLines.currentRun.emplace(std::async(storeQueueLines.impl, this)), true};
+ return {storeQueueLines.currentRun.emplace(std::async(std::launch::async, storeQueueLines.impl, this)), true};
}
Ingestor::Job::Result
@@ -454,7 +454,7 @@ namespace WebStat {
}
else if (expired(job.lastRun, freq, now)) {
if (!job.cond || std::invoke(job.cond, this)) {
- job.currentRun.emplace(std::async(job.impl, this));
+ job.currentRun.emplace(std::async(std::launch::async, job.impl, this));
}
}
};