diff options
author | Håvard Pettersen <havardpe@yahooinc.com> | 2023-02-01 11:15:54 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@yahooinc.com> | 2023-02-02 12:55:53 +0000 |
commit | 1b14946131aac874e69719c0df7e2c46f4e83ab7 (patch) | |
tree | 0d320d5e0657edff621749c9040e7c61a95414c0 /vespalib/src/tests | |
parent | 2754ecf502e84e1b4d9fe479d1f68ab1d6194882 (diff) |
make clang happy
Avoid checking thread id more than once in a corotuines, since clang
will assume it cannot change. Also set return values from the outside
of the coroutine instead of trying to infer it from the inside.
Fixed a race in async_run fuctions ('this' is not safe to use after
giving the coroutine away). This goes for all compilers.
Minor fix to io_uring connect to avoid returning valid non-connected
socket if connect was called after AsyncIo shutdown.
Stop using std::move when co_returning local move-only values. clang
15 likes this, but it might not make all compilers more happy...
Diffstat (limited to 'vespalib/src/tests')
-rw-r--r-- | vespalib/src/tests/coro/waiting_for/waiting_for_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/tests/coro/waiting_for/waiting_for_test.cpp b/vespalib/src/tests/coro/waiting_for/waiting_for_test.cpp index c6678657c34..a43ef952c60 100644 --- a/vespalib/src/tests/coro/waiting_for/waiting_for_test.cpp +++ b/vespalib/src/tests/coro/waiting_for/waiting_for_test.cpp @@ -47,7 +47,7 @@ Lazy<int> wait_for_value(Service &service) { template <typename T> Lazy<T> wait_for_fun(auto &&fun) { T result = co_await wait_for<T>(fun); - co_return std::move(result); + co_return result; } TEST(WaitingForTest, wait_for_external_async_int) { |