From 8e9d9156b0e3b0ece173726924c49d0aca227546 Mon Sep 17 00:00:00 2001 From: anand76 Date: Mon, 23 May 2022 20:06:14 -0700 Subject: [PATCH] Fix fbcode internal build failure (#10041) Summary: The build failed due to different namespaces for coroutines (std::experimental vs std) based on compiler version. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10041 Reviewed By: ltamasi Differential Revision: D36617212 Pulled By: anand1976 fbshipit-source-id: dfb25320788d32969317d5651173059e2cbd8bd5 --- util/async_file_reader.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util/async_file_reader.h b/util/async_file_reader.h index 82b240339..7ee72954c 100644 --- a/util/async_file_reader.h +++ b/util/async_file_reader.h @@ -54,7 +54,8 @@ class AsyncFileReader { file_(file), opts_(opts), read_reqs_(read_reqs), - num_reqs_(num_reqs) {} + num_reqs_(num_reqs), + next_(nullptr) {} bool await_ready() noexcept { return false; } @@ -62,7 +63,7 @@ class AsyncFileReader { // awaiting_coro parameter is the handle of the awaiter. The handle can be // resumed later, so we cache it here. bool await_suspend( - std::experimental::coroutine_handle<> awaiting_coro) noexcept { + folly::coro::impl::coroutine_handle<> awaiting_coro) noexcept { awaiting_coro_ = awaiting_coro; // MultiReadAsyncImpl always returns true, so caller will be suspended return reader_.MultiReadAsyncImpl(this); @@ -83,7 +84,7 @@ class AsyncFileReader { size_t num_reqs_; autovector io_handle_; autovector del_fn_; - std::experimental::coroutine_handle<> awaiting_coro_; + folly::coro::impl::coroutine_handle<> awaiting_coro_; // Use this to link to the next ReadAwaiter in the suspended coroutine // list. The head and tail of the list are tracked by AsyncFileReader. // We use this approach rather than an STL container in order to avoid