From 0ff8f9132552e03497b07e1e5c068660a7a04515 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 19 Oct 2024 16:17:58 +0200 Subject: libutil: disallow AsyncCollect relocations some promises capture `this`. we could also allocate a shared state, but this thing doesn't really need to ever be moved anyway. so there. Change-Id: I50b5c44684a8ab4e984b1323de21f97ace4a864a --- src/libutil/async-collect.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/libutil/async-collect.hh b/src/libutil/async-collect.hh index 9e0b8bad9..1c65ac8d6 100644 --- a/src/libutil/async-collect.hh +++ b/src/libutil/async-collect.hh @@ -63,6 +63,9 @@ public: { } + // oneDone promises capture `this` + KJ_DISALLOW_COPY_AND_MOVE(AsyncCollect); + kj::Promise> next() { if (remaining == 0 && results.empty()) { -- cgit v1.2.3