summaryrefslogtreecommitdiff
path: root/aisa
diff options
context:
space:
mode:
Diffstat (limited to 'aisa')
-rw-r--r--aisa/coroutine.h2
-rw-r--r--aisa/eval.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/aisa/coroutine.h b/aisa/coroutine.h
index 40a6982..a456c89 100644
--- a/aisa/coroutine.h
+++ b/aisa/coroutine.h
@@ -4,8 +4,6 @@
4 4
5namespace aisa { 5namespace aisa {
6 6
7 inline auto suspend() noexcept { return std::suspend_always{}; }
8
9 template<typename result_t> struct promise; 7 template<typename result_t> struct promise;
10 8
11 template<typename result_t> struct task : public std::coroutine_handle<promise<result_t>> { 9 template<typename result_t> struct task : public std::coroutine_handle<promise<result_t>> {
diff --git a/aisa/eval.h b/aisa/eval.h
index f97740c..6d65520 100644
--- a/aisa/eval.h
+++ b/aisa/eval.h
@@ -1,5 +1,7 @@
1#pragma once 1#pragma once
2 2
3#include <coroutine>
4
3#include "aisa/aisa.h" 5#include "aisa/aisa.h"
4 6
5namespace aisa { 7namespace aisa {
@@ -12,7 +14,7 @@ namespace aisa {
12 while (true) { 14 while (true) {
13 if (auto rv = crtp().load_reg(rn); rv.has_value()) 15 if (auto rv = crtp().load_reg(rn); rv.has_value())
14 co_return *rv; 16 co_return *rv;
15 co_await suspend(); 17 co_await std::suspend_always{};
16 } 18 }
17 } 19 }
18 20
@@ -21,7 +23,7 @@ namespace aisa {
21 while (true) { 23 while (true) {
22 if (crtp().store_reg(rn, rv)) 24 if (crtp().store_reg(rn, rv))
23 co_return; 25 co_return;
24 co_await suspend(); 26 co_await std::suspend_always{};
25 } 27 }
26 } 28 }
27 29