summaryrefslogtreecommitdiff
path: root/async/scheduler.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2022-09-10 17:10:34 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2022-09-10 17:10:34 +0200
commit7154aa76c18e89db23092e04b15fb21dc1d54103 (patch)
tree4c5c3db66ad03c93466b491d24afc7a78ee63032 /async/scheduler.h
parent2d75a9be32e2510ff32d331c33178c4625a53054 (diff)
async: Workaround for gcc bug.
Diffstat (limited to 'async/scheduler.h')
-rw-r--r--async/scheduler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/async/scheduler.h b/async/scheduler.h
index 5c2adaa..35f625e 100644
--- a/async/scheduler.h
+++ b/async/scheduler.h
@@ -162,6 +162,10 @@ struct task : public schedulable {
void return_void() {}
};
+ // Certain gcc builds hits a corner case triggering an internal error when trying to create a task.
+ // sizeof(task) == 8 appears to be one of the conditions, so we pad it as a workaround.
+ uint32_t _dummy;
+
task(std::coroutine_handle<promise_type> h) : schedulable(h) {}
};